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

Unified Diff: scheduler/status_server.py

Issue 6551020: Merge remote branch 'autotest-upstream/master' into try-box1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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 | « scheduler/monitor_db.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/status_server.py
diff --git a/scheduler/status_server.py b/scheduler/status_server.py
index 29d23db19bacba7eac71208884d22f5466d39388..c52867127912b63bfcb5214e3b0f0087c4274bf7 100644
--- a/scheduler/status_server.py
+++ b/scheduler/status_server.py
@@ -10,6 +10,7 @@ _HEADER = """
<body>
Actions:<br>
<a href="?reparse_config=1">Reparse global config values</a><br>
+<a href="?restart_scheduler=1">Restart the scheduler</a><br>
<br>
"""
@@ -74,6 +75,9 @@ class StatusServerRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
scheduler_config.config.read_config()
self.server._drone_manager.refresh_drone_configs()
self._write_line('Reparsed config!')
+ elif 'restart_scheduler' in arguments:
+ self.server._shutdown_scheduler = True
+ self._write_line('Posted the shutdown request')
self._write_line()
@@ -97,6 +101,7 @@ class StatusServer(BaseHTTPServer.HTTPServer):
StatusServerRequestHandler)
self._shutting_down = False
self._drone_manager = drone_manager.instance()
+ self._shutdown_scheduler = False
# ensure the listening socket is not inherited by child processes
old_flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
« no previous file with comments | « scheduler/monitor_db.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698