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

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: moving ./gitiles to ./lib/gitiles 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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 crash_data['signature'], 107 crash_data['signature'],
109 crash_data['client_id'], 108 crash_data['client_id'],
110 crash_data['platform'], 109 crash_data['platform'],
111 crash_data['stack_trace'], 110 crash_data['stack_trace'],
112 crash_data['customized_data'], 111 crash_data['customized_data'],
113 queue_name=constants.CRASH_ANALYSIS_QUEUE[crash_data['client_id']]) 112 queue_name=constants.CRASH_ANALYSIS_QUEUE[crash_data['client_id']])
114 except (KeyError, ValueError): # pragma: no cover. 113 except (KeyError, ValueError): # pragma: no cover.
115 # TODO: save exception in datastore and create a page to show them. 114 # TODO: save exception in datastore and create a page to show them.
116 logging.exception('Failed to process crash message') 115 logging.exception('Failed to process crash message')
117 logging.info(self.request.body) 116 logging.info(self.request.body)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698