| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from common import appengine_util | 9 from common import appengine_util |
| 10 from common import constants | 10 from common import constants |
| 11 from lib import time_util | 11 from libs import time_util |
| 12 from model import analysis_status | 12 from model import analysis_status |
| 13 from model.wf_analysis import WfAnalysis | 13 from model.wf_analysis import WfAnalysis |
| 14 from waterfall.analyze_build_failure_pipeline import AnalyzeBuildFailurePipeline | 14 from waterfall.analyze_build_failure_pipeline import AnalyzeBuildFailurePipeline |
| 15 | 15 |
| 16 | 16 |
| 17 @ndb.transactional | 17 @ndb.transactional |
| 18 def NeedANewAnalysis( | 18 def NeedANewAnalysis( |
| 19 master_name, builder_name, build_number, failed_steps, | 19 master_name, builder_name, build_number, failed_steps, |
| 20 build_completed, force): | 20 build_completed, force): |
| 21 """Checks status of analysis for the build and decides if a new one is needed. | 21 """Checks status of analysis for the build and decides if a new one is needed. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 pipeline_job.start(queue_name=queue_name) | 118 pipeline_job.start(queue_name=queue_name) |
| 119 | 119 |
| 120 logging.info('An analysis was scheduled for build %s, %s, %s: %s', | 120 logging.info('An analysis was scheduled for build %s, %s, %s: %s', |
| 121 master_name, builder_name, build_number, | 121 master_name, builder_name, build_number, |
| 122 pipeline_job.pipeline_status_path()) | 122 pipeline_job.pipeline_status_path()) |
| 123 else: | 123 else: |
| 124 logging.info('An analysis is not needed for build %s, %s, %s', | 124 logging.info('An analysis is not needed for build %s, %s, %s', |
| 125 master_name, builder_name, build_number) | 125 master_name, builder_name, build_number) |
| 126 | 126 |
| 127 return WfAnalysis.Get(master_name, builder_name, build_number) | 127 return WfAnalysis.Get(master_name, builder_name, build_number) |
| OLD | NEW |