Skip to content

Commit

Permalink
Sanitize watchdog message
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Dec 8, 2023
1 parent 632e3a1 commit 94585a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def main():
while not exit_event.is_set():
# Watchdog: NOTIFY and restart after 30 minutes of consecutive errors
if last_success < datetime.datetime.now() - datetime.timedelta(minutes=watch_dog_kill_switch_minutes):
watchdog_message = f"🐶 *WATCH DOG*\: Last success was more than {watch_dog_kill_switch_minutes} minutes ago\. Restarting\!"
watchdog_message = f"🐶 *WATCH DOG*\: Last success was more than {str(0.watch_dog_kill_switch_minutes).replace('.', '/.')} minutes ago\. Restarting\!"
log.error(watchdog_message)
try:
await messages.send_message(watchdog_message)
Expand Down

0 comments on commit 94585a0

Please sign in to comment.