Commit d383d7cd by Guba Sándor

merge task is now abortable

parent f3a27e66
......@@ -58,11 +58,15 @@ def snapshot(json_data):
disk.snapshot()
@celery.task()
def merge(old_json, new_json):
disk = Disk.deserialize(old_json)
new_disk = Disk.deserialize(new_json)
disk.merge(new_disk)
class merge(AbortableTask):
time_limit = 18000
def run(self, **kwargs):
old_json = kwargs['old_json']
new_json = kwargs['new_json']
disk = Disk.deserialize(old_json)
new_disk = Disk.deserialize(new_json)
disk.merge(self, new_disk)
@celery.task()
......
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