diff --git a/r2/example.ini b/r2/example.ini index caf00b784..219215749 100755 --- a/r2/example.ini +++ b/r2/example.ini @@ -364,11 +364,6 @@ sr_dropdown_threshold = 15 # seconds of each other comment_visits_period = 600 -# Set this to a nonzero range and the server will restart after this many -# minutes have passed -LOGANS_RUN_LOW = 0 -LOGANS_RUN_HIGH = 0 - #user-agents to rate-limit agents = diff --git a/r2/r2/controllers/reddit_base.py b/r2/r2/controllers/reddit_base.py index 4a940d4a1..32fa0e090 100644 --- a/r2/r2/controllers/reddit_base.py +++ b/r2/r2/controllers/reddit_base.py @@ -602,11 +602,6 @@ class MinimalController(BaseController): domain = v.domain, expires = v.expires) - if g.logans_run_limit: - if c.start_time > g.logans_run_limit and not g.shutdown: - g.log.info("Time to restart. It's been an honor serving with you.") - g.shutdown = 'init' - if g.usage_sampling <= 0.0: return diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index f73ba0170..7036a9dc2 100755 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -56,8 +56,6 @@ class Globals(object): 'MODWINDOW', 'RATELIMIT', 'QUOTA_THRESHOLD', - 'LOGANS_RUN_LOW', - 'LOGANS_RUN_HIGH', 'num_comments', 'max_comments', 'max_comments_gold', @@ -363,17 +361,6 @@ class Globals(object): (self.reddit_host, self.reddit_pid, self.short_version, datetime.now())) - if self.LOGANS_RUN_LOW: - minutes_to_live = random.randint(self.LOGANS_RUN_LOW, - self.LOGANS_RUN_HIGH) - self.logans_run_limit = datetime.now(self.tz) + timedelta(0, - minutes_to_live * 60) - disptime = self.logans_run_limit.astimezone(self.display_tz) - self.log.info("Will shut down at %s (%d minutes from now)" % - (disptime.strftime("%H:%M:%S"), minutes_to_live)) - else: - self.logans_run_limit = None - @staticmethod def to_bool(x):