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

Unified Diff: appengine/findit/handlers/process_flake_analysis_request.py

Issue 2435983003: [Findit] Asynchronously process flake reports from chromium-try-flakes. (Closed)
Patch Set: Rebase to resolve conflict 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/process_flake_analysis_request.py
diff --git a/appengine/findit/handlers/process_flake_analysis_request.py b/appengine/findit/handlers/process_flake_analysis_request.py
new file mode 100644
index 0000000000000000000000000000000000000000..b621787d6d08c70795e68dfaaccd25c1b451f9c3
--- /dev/null
+++ b/appengine/findit/handlers/process_flake_analysis_request.py
@@ -0,0 +1,25 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+import pickle
+
+from common.base_handler import BaseHandler
+from common.base_handler import Permission
+from waterfall.flake import flake_analysis_service
+from waterfall.flake import triggering_sources
+
+
+class ProcessFlakeAnalysisRequest(BaseHandler):
+ """Processes request of flake analysis and triggers the analysis on demand."""
+
+ PERMISSION_LEVEL = Permission.ADMIN
+
+ def HandlePost(self):
+ flake_analysis_request, user_email, is_admin = pickle.loads(
+ self.request.body)
+
+ flake_analysis_service.ScheduleAnalysisForFlake(
+ flake_analysis_request, user_email, is_admin,
+ triggering_sources.FINDIT_API)
« no previous file with comments | « appengine/findit/findit_api.py ('k') | appengine/findit/handlers/test/process_flake_analysis_request_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698