Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken health check function #16

Merged
merged 1 commit into from
May 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading