Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: appengine/findit/handlers/crash/crash_handler.py

Issue 2414523002: [Findit] Reorganizing findit_for_*.py (Closed)
Patch Set: Finally fixed the mock tests! Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/handlers/crash/crash_handler.py
diff --git a/appengine/findit/handlers/crash/crash_handler.py b/appengine/findit/handlers/crash/crash_handler.py
index 64970dda5c61d4bed496a3a2d34ae932bf661836..b446c737635fb68108ae66ac0533fa9560c1ba25 100644
--- a/appengine/findit/handlers/crash/crash_handler.py
+++ b/appengine/findit/handlers/crash/crash_handler.py
@@ -9,7 +9,8 @@ import logging
from common import constants
from common.base_handler import BaseHandler
from common.base_handler import Permission
-from crash import crash_pipeline
+from crash.crash_pipeline import FinditForClientID
+from crash.crash_report import CrashReport
class CrashHandler(BaseHandler):
@@ -102,15 +103,9 @@ class CrashHandler(BaseHandler):
logging.info('Crash data is %s', json.dumps(crash_data))
- crash_pipeline.ScheduleNewAnalysisForCrash(
- crash_data['crash_identifiers'],
- crash_data['chrome_version'],
- crash_data['signature'],
- crash_data['client_id'],
- crash_data['platform'],
- crash_data['stack_trace'],
- crash_data['customized_data'],
- queue_name=constants.CRASH_ANALYSIS_QUEUE[crash_data['client_id']])
+ client_id = crash_data['client_id']
+ FinditForClientID(client_id).ScheduleNewAnalysis(crash_data,
+ queue_name=constants.CRASH_ANALYSIS_QUEUE[client_id])
except (KeyError, ValueError): # pragma: no cover.
# TODO: save exception in datastore and create a page to show them.
logging.exception('Failed to process crash message')
« no previous file with comments | « appengine/findit/crash/test/stacktrace_test.py ('k') | appengine/findit/handlers/crash/test/crash_handler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698