Merge pull request #2163 from coreos-inc/fix-send-notification
Fix send notification on build manager
This commit is contained in:
commit
c4fbc8e2e4
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Reference in a new issue