diff --git a/bot/main.py b/bot/main.py index e68b4a3..a61756f 100644 --- a/bot/main.py +++ b/bot/main.py @@ -152,5 +152,18 @@ async def process_chats(): await post_chat_update(session, chat_object, fresh_xsrf_token) +async def main_loop(): + while True: + try: + await process_chats() + await asyncio.sleep(10) + + except asyncio.CancelledError: + print("cancelled normally (ok knowing my luck the error is gonna be this one every single time even tho it never actually is an error like this!) cute puppy: Hiiii") + break + except Exception as e: + print(f"error {e}") + await asyncio.sleep(10) + if __name__ == "__main__": - asyncio.run(process_chats()) + asyncio.run(main_loop()) diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index 5df0928..7f33578 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -1,6 +1,19 @@ @livewireStyles + {{ $slot }}