Merge pull request #2163 from coreos-inc/fix-send-notification

Fix send notification on build manager
This commit is contained in:
josephschorr 2016-11-28 13:35:03 -05:00 committed by GitHub
commit c4fbc8e2e4

View file

@ -367,11 +367,14 @@ class BuildComponent(BaseComponent):
logger.debug('Got remote failure exception for build %s: %s', build_id, aex)
yield From(self._build_finished(BuildJobResult.ERROR))
# Remove the current job.
self._current_job = None
@trollius.coroutine
def _build_finished(self, job_status):
""" Alerts the parent that a build has completed and sets the status back to running. """
yield From(self.parent_manager.job_completed(self._current_job, job_status, self))
self._current_job = None
# Set the component back to a running state.
yield From(self._set_status(ComponentStatus.RUNNING))
@ -481,7 +484,9 @@ class BuildComponent(BaseComponent):
yield From(self.parent_manager.job_completed(self._current_job,
BuildJobResult.INCOMPLETE,
self))
self._current_job = None
# Unregister the current component so that it cannot be invoked again.
self.parent_manager.build_component_disposed(self, True)
# Remove the job reference.
self._current_job = None