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

Unified Diff: Tools/GardeningServer/internal_alerts.py

Issue 728023004: Remove GardeningServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « Tools/GardeningServer/images/partytime.gif ('k') | Tools/GardeningServer/internal_alerts_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/internal_alerts.py
diff --git a/Tools/GardeningServer/internal_alerts.py b/Tools/GardeningServer/internal_alerts.py
deleted file mode 100644
index 75992dc5bce710b1cde5fa68a295358f91a84d11..0000000000000000000000000000000000000000
--- a/Tools/GardeningServer/internal_alerts.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2014 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 datetime
-import alerts
-import json
-import webapp2
-
-from google.appengine.api import users
-
-
-class InternalAlertsHandler(alerts.AlertsHandler):
- INTERNAL_ALERTS_TYPE = 'internal-alerts'
-
- # Has no 'request' member.
- # Has no 'response' member.
- # Use of super on an old style class.
- # pylint: disable=E1002,E1101
- def get(self):
- # Require users to be logged to see builder alerts from private/internal
- # trees.
- user = users.get_current_user()
- if not user:
- alerts = {}
- alerts.update({
- 'date': datetime.datetime.utcnow(),
- 'redirect-url': users.create_login_url(self.request.uri)})
- uncompressed = super(InternalAlertsHandler,
- self).generate_json_dump(alerts)
- super(InternalAlertsHandler, self).send_json_data(uncompressed)
- return
-
- email = user.email()
- if not email.endswith('@google.com'):
- self.response.set_status(403, 'invalid user')
- return
-
- super(InternalAlertsHandler, self).get_from_memcache(
- InternalAlertsHandler.INTERNAL_ALERTS_TYPE)
-
- def post(self):
- self.update_alerts(InternalAlertsHandler.INTERNAL_ALERTS_TYPE)
-
-
-app = webapp2.WSGIApplication([
- ('/internal-alerts', InternalAlertsHandler)])
« no previous file with comments | « Tools/GardeningServer/images/partytime.gif ('k') | Tools/GardeningServer/internal_alerts_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698