Commit 19cd54c1 by Dudás Ádám

storage: extract queue name value to variable

parent 127e1fd8
...@@ -148,15 +148,14 @@ class Disk(TimeStampedModel): ...@@ -148,15 +148,14 @@ class Disk(TimeStampedModel):
return False return False
# Delegate create / snapshot jobs # Delegate create / snapshot jobs
queue_name = self.datastore.hostname + ".storage"
disk_desc = self.get_disk_desc() disk_desc = self.get_disk_desc()
if self.type == 'qcow2-snap': if self.type == 'qcow2-snap':
remote_tasks.snapshot.apply_async( remote_tasks.snapshot.apply_async(args=[disk_desc],
args=[disk_desc], queue=queue_name).get()
queue=self.datastore.hostname + ".storage").get()
else: else:
remote_tasks.create.apply_async( remote_tasks.create.apply_async(args=[disk_desc],
args=[disk_desc], queue=queue_name).get()
queue=self.datastore.hostname + ".storage").get()
self.ready = True self.ready = True
self.save() self.save()
......
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