diff --git a/r2/r2/config/routing.py b/r2/r2/config/routing.py index 6a35fc6507..75e7c82e13 100644 --- a/r2/r2/config/routing.py +++ b/r2/r2/config/routing.py @@ -148,7 +148,6 @@ def make_map(global_conf={}, app_conf={}): mc('/health', controller='health', action='health') mc('/health/:action', controller='health', requirements=dict(action="threads|dump|sleep")) - mc('/shutdown', controller='health', action='shutdown') mc('/', controller='hot', action='listing') diff --git a/r2/r2/controllers/health.py b/r2/r2/controllers/health.py index 7acb0a18dd..6da3ca9b55 100644 --- a/r2/r2/controllers/health.py +++ b/r2/r2/controllers/health.py @@ -22,12 +22,8 @@ def pre(self): def GET_health(self): c.dontcache = True - - if g.shutdown: - abort(503, 'service temporarily unavailable') - else: - response.headers['Content-Type'] = 'text/plain' - return "i'm still alive!" + response.headers['Content-Type'] = 'text/plain' + return "i'm still alive!" @validate(secret=nop('secret')) def GET_sleep(self, secret): @@ -81,16 +77,3 @@ def GET_dump(self, secret): response.headers['Content-Type'] = 'text/plain' return output or 'no busy threads' - - @validate(secret=nop('secret')) - def GET_shutdown(self, secret): - if not g.shutdown_secret: - self.abort404() - if not secret or secret != g.shutdown_secret: - self.abort403() - - c.dontcache = True - #the will make the next health-check initiate the shutdown - g.shutdown = 'init' - response.headers['Content-Type'] = 'text/plain' - return 'shutting down...' diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index bf2392327a..aad3f9f7e8 100755 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -358,9 +358,6 @@ def reset_caches(): self.log.debug("Overriding g.%s to %s" % (k, v)) setattr(self, k, v) - #the shutdown toggle - self.shutdown = False - #if we're going to use the query_queue, we need amqp if self.write_query_queue and not self.amqp_host: raise Exception("amqp_host must be defined to use the query queue")