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

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

Issue 1866883002: [Findit] A huge refactoring and some bug fixing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nit. Created 4 years, 8 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
« no previous file with comments | « appengine/findit/handlers/list_analyses.py ('k') | appengine/findit/handlers/result_status.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/monitor_alerts.py
diff --git a/appengine/findit/handlers/monitor_alerts.py b/appengine/findit/handlers/monitor_alerts.py
index 5f9e83b9c0ab029f3131dc01870b9c991510fe67..6e5a8c6e06746b6bf7fab20535d81d05f870bb30 100644
--- a/appengine/findit/handlers/monitor_alerts.py
+++ b/appengine/findit/handlers/monitor_alerts.py
@@ -7,16 +7,13 @@ import logging
from base_handler import BaseHandler
from base_handler import Permission
+from common import constants
from common.http_client_appengine import HttpClientAppengine
from waterfall import buildbot
from waterfall import build_failure_analysis_pipelines
from waterfall import waterfall_config
-_ALERTS_SOURCE_URL = 'https://sheriff-o-matic.appspot.com/alerts'
-_BUILD_FAILURE_ANALYSIS_TASKQUEUE = 'build-failure-analysis-queue'
-
-
def _GetLatestBuildFailures(http_client):
"""Returns latest build failures from alerts in Sheriff-o-Matic.
@@ -32,7 +29,8 @@ def _GetLatestBuildFailures(http_client):
...
]
"""
- status_code, content = http_client.Get(_ALERTS_SOURCE_URL, timeout_seconds=30)
+ status_code, content = http_client.Get(
+ constants.WATERFALL_ALERTS_URL, timeout_seconds=30)
if status_code != 200:
logging.error('Failed to pull alerts from Sheriff-o-Matic.')
return []
@@ -95,4 +93,4 @@ class MonitorAlerts(BaseHandler):
build_failure['build_number'],
failed_steps=build_failure['failed_steps'],
force=False,
- queue_name=_BUILD_FAILURE_ANALYSIS_TASKQUEUE)
+ queue_name=constants.WATERFALL_ANALYSIS_QUEUE)
« no previous file with comments | « appengine/findit/handlers/list_analyses.py ('k') | appengine/findit/handlers/result_status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698