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

Side by Side Diff: appengine/findit/handlers/crash/crash_handler.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: rebase-update Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 base64 5 import base64
6 import json 6 import json
7 import logging 7 import logging
8 8
9 from common import constants 9 from common import constants
10 from common.base_handler import BaseHandler 10 from common.base_handler import BaseHandler, Permission
11 from common.base_handler import Permission
12 from crash import crash_pipeline 11 from crash import crash_pipeline
13 12
14 13
15 class CrashHandler(BaseHandler): 14 class CrashHandler(BaseHandler):
16 PERMISSION_LEVEL = Permission.ANYONE 15 PERMISSION_LEVEL = Permission.ANYONE
17 16
18 def HandlePost(self): 17 def HandlePost(self):
19 """Handles push delivery from Pub/Sub for crash data. 18 """Handles push delivery from Pub/Sub for crash data.
20 19
21 The crash data should be in the following json format: 20 The crash data should be in the following json format:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 crash_data['client_id'], 77 crash_data['client_id'],
79 crash_data['platform'], 78 crash_data['platform'],
80 crash_data['stack_trace'], 79 crash_data['stack_trace'],
81 crash_data['customized_data']['channel'], 80 crash_data['customized_data']['channel'],
82 crash_data['customized_data']['historical_metadata'], 81 crash_data['customized_data']['historical_metadata'],
83 queue_name=constants.CRASH_ANALYSIS_FRACAS_QUEUE) 82 queue_name=constants.CRASH_ANALYSIS_FRACAS_QUEUE)
84 except (KeyError, ValueError): # pragma: no cover. 83 except (KeyError, ValueError): # pragma: no cover.
85 # TODO: save exception in datastore and create a page to show them. 84 # TODO: save exception in datastore and create a page to show them.
86 logging.exception('Failed to process crash message') 85 logging.exception('Failed to process crash message')
87 logging.info(self.request.body) 86 logging.info(self.request.body)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698