Commit d83db63b by Guba Sándor

vm: removed backend parameter from AbortableAsyncResult inside operation

parent aab4fb6c
...@@ -24,7 +24,6 @@ from taggit.managers import TaggableManager ...@@ -24,7 +24,6 @@ from taggit.managers import TaggableManager
from acl.models import AclBase from acl.models import AclBase
from common.operations import OperatedMixin from common.operations import OperatedMixin
from manager.mancelery import celery
from ..tasks import vm_tasks, agent_tasks from ..tasks import vm_tasks, agent_tasks
from .activity import (ActivityInProgressError, instance_activity, from .activity import (ActivityInProgressError, instance_activity,
InstanceActivity) InstanceActivity)
...@@ -828,8 +827,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin, ...@@ -828,8 +827,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
return remote.get(timeout=step) return remote.get(timeout=step)
except TimeoutError: except TimeoutError:
if task is not None and task.is_aborted(): if task is not None and task.is_aborted():
AbortableAsyncResult(remote.id, AbortableAsyncResult(remote.id).abort()
backend=celery.backend).abort()
raise Exception("Shutdown aborted by user.") raise Exception("Shutdown aborted by user.")
def suspend_vm(self, timeout=60): def suspend_vm(self, timeout=60):
......
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