Adding in a cancel method to the build component so we can properly clean up the job task.

This commit is contained in:
Charlton Austin 2016-12-05 14:56:18 -05:00
parent 3bbd8ca898
commit c6be12e31e
3 changed files with 11 additions and 2 deletions

View file

@ -490,3 +490,9 @@ class BuildComponent(BaseComponent):
# Remove the job reference.
self._current_job = None
@trollius.coroutine
def cancel_build(self):
self.parent_manager.build_component_disposed(self, True)
self._current_job = None
yield From(self._set_status(ComponentStatus.RUNNING))