Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
only apply jobs if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Jul 25, 2013
1 parent a09d60e commit 959c79c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/models.py
Expand Up @@ -429,7 +429,8 @@ def destroy(self):
# create subtasks to terminate all nodes in parallel
subtasks.extend([ layer.destroy() for layer in self.layer_set.all() ])
job = group(*subtasks)
job.apply_async().join() # block for termination
if job:
job.apply_async().join() # block for termination


@python_2_unicode_compatible
Expand Down

0 comments on commit 959c79c

Please sign in to comment.