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

Unified Diff: appengine/sheriff_o_matic/ts_alerts.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: clean up code Created 5 years, 4 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/sheriff_o_matic/ts_alerts.py
diff --git a/appengine/sheriff_o_matic/ts_alerts.py b/appengine/sheriff_o_matic/ts_alerts.py
index e2920f208c3f2a7e56ec16ffbacceee77d4557d5..293d37ed872657e43f6cb2a2386f4c7103781511 100644
--- a/appengine/sheriff_o_matic/ts_alerts.py
+++ b/appengine/sheriff_o_matic/ts_alerts.py
@@ -10,6 +10,7 @@ import logging
import webapp2
import zlib
+from alerts import increment_monarch
from datetime import datetime as dt
from google.appengine.api import memcache
from google.appengine.api import users
@@ -90,6 +91,7 @@ class TimeSeriesAlertsHandler(webapp2.RequestHandler):
STALE_ALERT_TIMEOUT = 300
def get(self, key=None):
+ increment_monarch('ts-alerts')
self.remove_expired_alerts()
if not users.get_current_user():
results = {'date': dt.utcnow(),
@@ -224,6 +226,7 @@ class TimeSeriesAlertsHandler(webapp2.RequestHandler):
class TimeSeriesAlertsHistory(alerts_history.AlertsHistory):
def get(self, timestamp=None):
+ increment_monarch('ts-alerts-history')
result_json = {}
if not users.get_current_user():
result_json['login-url'] = users.create_login_url(self.request.uri)

Powered by Google App Engine
This is Rietveld 408576698