We need to call build_finished async.
This commit is contained in:
parent
8e16fbf59b
commit
ef70432b11
1 changed files with 4 additions and 4 deletions
|
@ -247,7 +247,7 @@ class BuildComponent(BaseComponent):
|
|||
logger.warning('Build %s failed with message: %s', build_id, error_message)
|
||||
|
||||
# Mark that the build has finished (in an error state)
|
||||
self._build_finished(BuildJobResult.ERROR)
|
||||
trollius.async(self._build_finished(BuildJobResult.ERROR))
|
||||
|
||||
def _build_complete(self, result):
|
||||
""" Wraps up a completed build. Handles any errors and calls self._build_finished. """
|
||||
|
@ -255,7 +255,7 @@ class BuildComponent(BaseComponent):
|
|||
# Retrieve the result. This will raise an ApplicationError on any error that occurred.
|
||||
result.result()
|
||||
self._build_status.set_phase(BUILD_PHASE.COMPLETE)
|
||||
self._build_finished(BuildJobResult.COMPLETE)
|
||||
trollius.async(self._build_finished(BuildJobResult.COMPLETE))
|
||||
except ApplicationError as aex:
|
||||
worker_error = WorkerError(aex.error, aex.kwargs.get('base_error'))
|
||||
|
||||
|
@ -265,9 +265,9 @@ class BuildComponent(BaseComponent):
|
|||
|
||||
# Mark the build as completed.
|
||||
if worker_error.is_internal_error():
|
||||
self._build_finished(BuildJobResult.INCOMPLETE)
|
||||
trollius.async(self._build_finished(BuildJobResult.INCOMPLETE))
|
||||
else:
|
||||
self._build_finished(BuildJobResult.ERROR)
|
||||
trollius.async(self._build_finished(BuildJobResult.ERROR))
|
||||
|
||||
@trollius.coroutine
|
||||
def _build_finished(self, job_status):
|
||||
|
|
Reference in a new issue