Commit d383d7cd by Guba Sándor

merge task is now abortable

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