Skip to content

Commit

Permalink
Remove broken, no-good, useless health check
Browse files Browse the repository at this point in the history
I have an updated logging solution that can provide notifications for this now. Don't need this old check anyways.
  • Loading branch information
Ghostopheles committed May 18, 2024
1 parent b388d79 commit ad69c5c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions cogs/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,6 @@ def __init__(self, bot: bridge.Bot):
self.cdn_auto_refresh.add_exception_type(httpx.ConnectTimeout)
self.cdn_auto_refresh.start()
self.integrity_check.start()
self.check_loop_health.start()

@tasks.loop(minutes=6)
async def check_loop_health(self):
last_update = self.last_update

if last_update == 0 and self.check_loop_health.current_loop == 0:
return

now = time.time()
buffer = 45 # seconds

fetch_interval = self.live_cfg.get_fetch_interval()
mins_since_last_update = ((now - last_update) + buffer) * 60

if mins_since_last_update > fetch_interval:
message = f"Algalon CDN refresh loop stopped\nLast update: {self.last_update_formatted}"
await self.bot.send_message_to_owner(message)

@tasks.loop(hours=24)
async def integrity_check(self):
Expand Down

0 comments on commit ad69c5c

Please sign in to comment.