Begin implementing RTS

This commit is contained in:
2026-02-17 12:14:29 +00:00
parent dc533f266f
commit 81f05d4263
14 changed files with 484 additions and 268 deletions

View File

@@ -1,8 +1,10 @@
import asyncio
from os import getenv
from time import sleep
import uvloop
import db
import util
from sources.ch4 import Chan4
from sources.dis import DiscordClient
@@ -34,6 +36,17 @@ async def main(loop):
loop.create_task(chan.run())
created = False
while not created:
try:
db.create_index(db.api_client)
created = True
except Exception as e:
print(f"Error creating index: {e}")
sleep(1) # Block the thread, just wait for the DB
db.update_schema()
loop = asyncio.get_event_loop()
loop.create_task(main(loop))