From 59aba935145b2b9cb3e8a2107ddbd2b4359ab9d7 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 17 Jun 2015 14:11:22 -0400 Subject: [PATCH 1/2] builder: update heartbeat timestamp on log message --- buildman/component/buildcomponent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildman/component/buildcomponent.py b/buildman/component/buildcomponent.py index c4c8544d1..5b05f36b7 100644 --- a/buildman/component/buildcomponent.py +++ b/buildman/component/buildcomponent.py @@ -195,6 +195,9 @@ class BuildComponent(BaseComponent): def _on_log_message(self, phase, json_data): """ Tails log messages and updates the build status. """ + # Update the heartbeat. + self._last_heartbeat = datetime.datetime.utcnow() + # Parse any of the JSON data logged. docker_data = {} if json_data: From 177b96e96502f2300512b470406a2f380b3fde15 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 17 Jun 2015 14:11:51 -0400 Subject: [PATCH 2/2] builder: add missing 'yield from' coroutine --- buildman/component/buildcomponent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildman/component/buildcomponent.py b/buildman/component/buildcomponent.py index 5b05f36b7..51819e95b 100644 --- a/buildman/component/buildcomponent.py +++ b/buildman/component/buildcomponent.py @@ -419,7 +419,9 @@ class BuildComponent(BaseComponent): self._build_status.set_error('Build worker timed out', internal_error=True, requeued=self._current_job.has_retries_remaining()) - self.parent_manager.job_completed(self._current_job, BuildJobResult.INCOMPLETE, self) + yield trollius.From(self.parent_manager.job_completed(self._current_job, + BuildJobResult.INCOMPLETE, + self)) self._build_status = None self._current_job = None