From ef70432b117f0fa85d9e5e0d840a439c894447be Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Tue, 23 Dec 2014 16:04:10 -0500 Subject: [PATCH] We need to call build_finished async. --- buildman/component/buildcomponent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildman/component/buildcomponent.py b/buildman/component/buildcomponent.py index 391f8ffed..726435bcc 100644 --- a/buildman/component/buildcomponent.py +++ b/buildman/component/buildcomponent.py @@ -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):