| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 copy | 5 import copy |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from common import appengine_util | 9 from common import appengine_util |
| 10 from common import pubsub_util | 10 from common import pubsub_util |
| 11 from common import time_util | |
| 12 from common.http_client_appengine import HttpClientAppengine | 11 from common.http_client_appengine import HttpClientAppengine |
| 13 from common.pipeline_wrapper import BasePipeline | 12 from common.pipeline_wrapper import BasePipeline |
| 14 from common.pipeline_wrapper import pipeline | 13 from common.pipeline_wrapper import pipeline |
| 15 from crash import findit_for_chromecrash | 14 from crash import findit_for_chromecrash |
| 16 from crash import findit_for_clusterfuzz | 15 from crash import findit_for_clusterfuzz |
| 17 from crash.type_enums import CrashClient | 16 from crash.type_enums import CrashClient |
| 17 from lib import time_util |
| 18 from lib.gitiles import gitiles_repository | 18 from lib.gitiles import gitiles_repository |
| 19 from model import analysis_status | 19 from model import analysis_status |
| 20 | 20 |
| 21 | 21 |
| 22 # TODO(http://crbug.com/659346): this needs complete coverage tests. | 22 # TODO(http://crbug.com/659346): this needs complete coverage tests. |
| 23 def FinditForClientID(client_id): | 23 def FinditForClientID(client_id): |
| 24 """Construct a Findit object from a client id string specifying the class. | 24 """Construct a Findit object from a client id string specifying the class. |
| 25 | 25 |
| 26 We cannot pass Findit objects to the various methods in | 26 We cannot pass Findit objects to the various methods in |
| 27 ``crash.crash_pipeline``, because they are not JSON serializable. For | 27 ``crash.crash_pipeline``, because they are not JSON serializable. For |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 N.B., due to the structure of AppEngine pipelines, this method must | 214 N.B., due to the structure of AppEngine pipelines, this method must |
| 215 accept the same arguments as are passed to ``__init__``; however, | 215 accept the same arguments as are passed to ``__init__``; however, |
| 216 because they were already passed to ``__init__`` there's no use in | 216 because they were already passed to ``__init__`` there's no use in |
| 217 recieving them here. Thus, we discard all the arguments to this method | 217 recieving them here. Thus, we discard all the arguments to this method |
| 218 (except for ``self``, naturally). | 218 (except for ``self``, naturally). |
| 219 """ | 219 """ |
| 220 run_analysis = yield CrashAnalysisPipeline( | 220 run_analysis = yield CrashAnalysisPipeline( |
| 221 self._client_id, self._crash_identifiers) | 221 self._client_id, self._crash_identifiers) |
| 222 with pipeline.After(run_analysis): | 222 with pipeline.After(run_analysis): |
| 223 yield PublishResultPipeline(self._client_id, self._crash_identifiers) | 223 yield PublishResultPipeline(self._client_id, self._crash_identifiers) |
| OLD | NEW |