From 2b9a8d34ce09edff433a1d971267b7cb00fb6cb3 Mon Sep 17 00:00:00 2001 From: nex Date: Wed, 18 Jan 2023 20:57:07 +0000 Subject: [PATCH] Fix test frequency --- .../28efee07-d306-4126-bf69-01008b4887e2.xml | 9 +++++++-- cogs/uptime.py | 12 ++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.idea/dataSources/28efee07-d306-4126-bf69-01008b4887e2.xml b/.idea/dataSources/28efee07-d306-4126-bf69-01008b4887e2.xml index de2c2c7..36e4d02 100644 --- a/.idea/dataSources/28efee07-d306-4126-bf69-01008b4887e2.xml +++ b/.idea/dataSources/28efee07-d306-4126-bf69-01008b4887e2.xml @@ -1604,12 +1604,17 @@ TEXT|0s 7 - + + BOOLEAN|0s + 1 + 8 + + entry_id 1 1 - + entry_id 1 sqlite_autoindex_uptime_1 diff --git a/cogs/uptime.py b/cogs/uptime.py index fffe08c..0126875 100644 --- a/cogs/uptime.py +++ b/cogs/uptime.py @@ -12,6 +12,14 @@ from httpx import AsyncClient, Response from discord.ext import commands, tasks, pages from utils import UptimeEntry, console +""" +Notice to anyone looking at this code: +Don't +It doesn't look nice +It's not well written +It just works +""" + BASE_JSON = """[ { @@ -227,8 +235,8 @@ class UptimeCompetition(commands.Cog): return await asyncio.gather(*create_tasks, return_exceptions=True) # All done! - # @tasks.loop(minutes=1) - @tasks.loop(seconds=10) + @tasks.loop(minutes=1) + # @tasks.loop(seconds=30) async def test_uptimes(self): self.task_event.clear() async with self.task_lock: