Fix test frequency

This commit is contained in:
nex 2023-01-18 20:57:07 +00:00
parent bb927f4d7b
commit 2b9a8d34ce
2 changed files with 17 additions and 4 deletions

View file

@ -1604,12 +1604,17 @@
<DasType>TEXT|0s</DasType> <DasType>TEXT|0s</DasType>
<Position>7</Position> <Position>7</Position>
</column> </column>
<index id="549" parent="488" name="sqlite_autoindex_uptime_1"> <column id="549" parent="488" name="notice_sent">
<DasType>BOOLEAN|0s</DasType>
<NotNull>1</NotNull>
<Position>8</Position>
</column>
<index id="550" parent="488" name="sqlite_autoindex_uptime_1">
<ColNames>entry_id</ColNames> <ColNames>entry_id</ColNames>
<NameSurrogate>1</NameSurrogate> <NameSurrogate>1</NameSurrogate>
<Unique>1</Unique> <Unique>1</Unique>
</index> </index>
<key id="550" parent="488"> <key id="551" parent="488">
<ColNames>entry_id</ColNames> <ColNames>entry_id</ColNames>
<Primary>1</Primary> <Primary>1</Primary>
<UnderlyingIndexName>sqlite_autoindex_uptime_1</UnderlyingIndexName> <UnderlyingIndexName>sqlite_autoindex_uptime_1</UnderlyingIndexName>

View file

@ -12,6 +12,14 @@ from httpx import AsyncClient, Response
from discord.ext import commands, tasks, pages from discord.ext import commands, tasks, pages
from utils import UptimeEntry, console 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 = """[ BASE_JSON = """[
{ {
@ -227,8 +235,8 @@ class UptimeCompetition(commands.Cog):
return await asyncio.gather(*create_tasks, return_exceptions=True) return await asyncio.gather(*create_tasks, return_exceptions=True)
# All done! # All done!
# @tasks.loop(minutes=1) @tasks.loop(minutes=1)
@tasks.loop(seconds=10) # @tasks.loop(seconds=30)
async def test_uptimes(self): async def test_uptimes(self):
self.task_event.clear() self.task_event.clear()
async with self.task_lock: async with self.task_lock: