def send_delete_galaxy_history(sender, instance, using, **kwargs): """ removes history from db and from Galaxy server in an asynchronous call to celery """ print "Removing an history signal" deletegalaxyhistory.delay(instance.history)
def post(self, request): if "yes" in request.POST: for e in WorkspaceHistory.objects.filter( history__in=request.session.get('histories', [])).filter( deleted=False): e.deleted = True e.save() deletegalaxyhistory.delay(e.history) return redirect('previous_analyses')
def delete(self, request, *args, **kwargs): """ Calls the delete() method on the fetched object and then redirects to the success URL. """ self.object = self.get_object() self.object.deleted = True self.object.save() deletegalaxyhistory.delay(self.object.history) return HttpResponseRedirect(self.get_success_url())
def post(self,request): if "yes" in request.POST: for e in WorkspaceHistory.objects.filter(history__in=request.session.get('histories', [])).filter(deleted=False): if e.workflow is not None: deletegalaxyworkflow.delay(e.workflow.id_galaxy) e.workflow.deleted = True e.workflow.save() e.deleted = True e.save() deletegalaxyhistory.delay(e.history) return redirect('previous_analyses')
def delete(self, request, *args, **kwargs): """ Calls the delete() method on the fetched object and then redirects to the success URL. """ self.object = self.get_object() self.object.deleted = True self.object.save() if self.object.workflow is not None: deletegalaxyworkflow.delay(self.object.workflow.id_galaxy) self.object.workflow.deleted = True self.object.workflow.save() deletegalaxyhistory.delay(self.object.history) return HttpResponseRedirect(self.get_success_url())