Commit 2a890679 by Bálint Máhonfai

Use get with timeout for export

parent eafbc489
...@@ -469,11 +469,11 @@ class Disk(TimeStampedModel): ...@@ -469,11 +469,11 @@ class Disk(TimeStampedModel):
disk.save() disk.save()
return disk return disk
def export(self, format): def export(self, format, timeout=600):
queue_name = self.get_remote_queue_name('storage', priority='slow') queue_name = self.get_remote_queue_name('storage', priority='slow')
storage_tasks.export.apply_async( storage_tasks.export.apply_async(
args=[self.get_disk_desc(), format], args=[self.get_disk_desc(), format],
queue=queue_name) queue=queue_name).get(timeout=timeout)
def destroy(self, user=None, task_uuid=None): def destroy(self, user=None, task_uuid=None):
if self.destroyed: if self.destroyed:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment