mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
Remove unused app restart code obviated by uWSGI.
This commit is contained in:
@@ -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 =
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user