Nir Soffer has posted comments on this change.
Change subject: task: add the support for abort_callback ......................................................................
Patch Set 5:
(2 comments)
https://gerrit.ovirt.org/#/c/33689/5//COMMIT_MSG Commit Message:
Line 16: Line 17: # abort_callback registers the callback for the time Line 18: # of execution of the code block Line 19: with vars.task.abort_callback(abort_long_operation): Line 20: long_operation.execute() Expand the tab Line 21: Line 22: When another thread (e.g. an external xml-rpc request) tries Line 23: to abort the task (calling "stop"), the registered callbacks Line 24: will be called.
https://gerrit.ovirt.org/#/c/33689/5/vdsm/storage/task.py File vdsm/storage/task.py:
Line 484: self.state = State(State.init) Line 485: self.result = TaskResult(0, "Task is initializing", "") Line 486: Line 487: self.resOwner = resourceManager.Owner(proxy(self), Line 488: raiseonfailure=True) Is this related? Line 489: self.error = se.TaskAborted("Unknown error encountered") Line 490: Line 491: self.mng = None Line 492: self._abort_lock = threading.Lock()