Chromium Code Reviews| Index: appengine/findit/waterfall/monitor_try_job_pipeline.py |
| diff --git a/appengine/findit/waterfall/monitor_try_job_pipeline.py b/appengine/findit/waterfall/monitor_try_job_pipeline.py |
| index 0584130675192e97cdfaeab86d73b3af3545378f..bb864a71fd8732575b08e38f5bc345756fbf4918 100644 |
| --- a/appengine/findit/waterfall/monitor_try_job_pipeline.py |
| +++ b/appengine/findit/waterfall/monitor_try_job_pipeline.py |
| @@ -206,6 +206,7 @@ class MonitorTryJobPipeline(BasePipeline): |
| start_time = None |
| while True: |
| error, build = buildbucket_client.GetTryJobs([try_job_id])[0] |
| + |
| if error: |
| if allowed_response_error_times > 0: |
| allowed_response_error_times -= 1 |
| @@ -253,4 +254,10 @@ class MonitorTryJobPipeline(BasePipeline): |
| 'Try job %s timed out after %d hours.' % ( |
| try_job_id, timeout_hours)) |
| + # Ensure last_buildbucket_response is always the most recent |
| + # whenever available during intermediate queries. |
| + if build and build.response: |
| + try_job_data.last_buildbucket_response = build.response |
|
stgao
2016/08/19 21:44:36
nit: not update datastore if the current response
|
| + try_job_data.put() |
| + |
| time.sleep(pipeline_wait_seconds) # pragma: no cover |