Commit be246be6 by Bach Dániel

vm: discard tasks on celery start

parent 6658f290
......@@ -232,6 +232,8 @@ def node_activity(code_suffix, node, task_uuid=None, user=None):
def cleanup(conf=None, **kwargs):
# TODO check if other manager workers are running
from celery.task.control import discard_all
for i in InstanceActivity.objects.filter(finished__isnull=True):
i.finish(False, "Manager is restarted, activity is cleaned up. "
"You can try again now.")
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