Skip to content

Commit

Permalink
Update spanreed_monitor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurdok authored Aug 15, 2024
1 parent d33dced commit 3073971
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spanreed/plugins/spanreed_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def run_for_user(self, user: User) -> None:
async def _monitor_exceptions(self, user: User) -> None:
bot: TelegramBotApi = await TelegramBotApi.for_user(user)
await bot.send_message("Spanreed is starting up.")

interval: datetime.timedelta = datetime.timedelta(days=1, hours=6)

try:
Expand All @@ -50,6 +50,7 @@ async def _monitor_exceptions(self, user: User) -> None:
parse_markdown=True,
)
await bot.send_message("Spanreed is still running.")
await redis_api.del(self.EXCEPTION_QUEUE_NAME)
except asyncio.CancelledError:
self._logger.info("Spanreed Monitor cancelled.")
await bot.send_message("Spanreed is shutting down.")
Expand Down

0 comments on commit 3073971

Please sign in to comment.