| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from datetime import datetime | 5 from datetime import datetime |
| 6 | 6 |
| 7 from common.http_client_appengine import HttpClientAppengine as HttpClient | 7 from common.http_client_appengine import HttpClientAppengine as HttpClient |
| 8 from model.wf_build import WfBuild | 8 from model.wf_build import WfBuild |
| 9 from waterfall import buildbot | 9 from waterfall import buildbot |
| 10 from waterfall import lock_util | 10 from waterfall import lock_util |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 if not build.data or not use_cbe: | 48 if not build.data or not use_cbe: |
| 49 # Retrieve build data from build master. | 49 # Retrieve build data from build master. |
| 50 build.data = buildbot.GetBuildDataFromBuildMaster( | 50 build.data = buildbot.GetBuildDataFromBuildMaster( |
| 51 master_name, builder_name, build_number, HTTP_CLIENT_LOGGING_ERRORS) | 51 master_name, builder_name, build_number, HTTP_CLIENT_LOGGING_ERRORS) |
| 52 build.data_source = BUILDBOT_MASTER | 52 build.data_source = BUILDBOT_MASTER |
| 53 | 53 |
| 54 build.last_crawled_time = datetime.utcnow() | 54 build.last_crawled_time = datetime.utcnow() |
| 55 build.put() | 55 build.put() |
| 56 | 56 |
| 57 return build | 57 return build |
| 58 |
| 59 |
| 60 def GetBuildEndTime(master_name, builder_name, build_number): |
| 61 build = DownloadBuildData(master_name, builder_name, build_number) |
| 62 build_info = buildbot.ExtractBuildInfo( |
| 63 master_name, builder_name, build_number, build.data) |
| 64 return build_info.build_end_time |
| OLD | NEW |