Skip to content

Commit

Permalink
changing botStartTime global at restart. Apparently globals aren't re…
Browse files Browse the repository at this point in the history
…set in docker after restart
  • Loading branch information
Bombg committed Oct 12, 2024
1 parent 8b357a4 commit 12ef824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Constants:
WAIT_BETWEEN_MESSAGES = 1800 # minimum amount of time in seconds the stream has to be offline before new notification messages.
MIN_TIME_BEFORE_AVATAR_CHANGE = 48 # Minimum time before avatar changes -- in hours
ONLINE_MESSAGE_REBROADCAST_TIME = 86400 #Time in seconds the stream will be online before another online notification will be broadcasted
TIME_BEFORE_BOT_RESTART = 21600 #time in seconds before bot will restart. Restart checks are made every 10 minutes
TIME_BEFORE_BOT_RESTART = 86400 #time in seconds before bot will restart. Restart checks are made every 10 minutes
TIME_OFFLINE_BEFORE_RESTART = 900 #minimum time in seconds stream needs to be offline before bot will restart IF TIME_BEFORE_BOT_RESTART time has been met
TEMP_TITLE_UPTIME = 57600 #Time in seconds temp titles will be used before default titles are used
TIME_BEFORE_REVIEW_RESET = 300 # Time a whitelisted person has to review a confession before its added back to the queue
Expand Down
1 change: 1 addition & 0 deletions StaticMethods.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def timeToSeconds(newTime: float) -> int:

def rebootServer() -> None:
logger.critical("Sassbot server rebooting from restart command or fd leak detection or scheduled restart based off TIME_BEFORE_BOT_RESTART")
globals.botStartTime = time.time()
os.system('reboot')

def safeRebootServer() -> None:
Expand Down

0 comments on commit 12ef824

Please sign in to comment.