Merge pull request #146 from jzelinskie/timeout

help with the timeouts and all
This commit is contained in:
josephschorr 2015-06-17 14:18:41 -04:00
commit 99dff912af

View file

@ -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:
@ -416,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