Exemple #1
0
 async def reload_padevents(self) -> NoReturn:
     await self.bot.wait_until_ready()
     with suppress(asyncio.CancelledError):
         async for _ in repeating_timer(60 * 60):
             try:
                 await self.refresh_data()
             except asyncio.CancelledError:
                 raise
             except Exception:
                 logger.exception("Error in loop:")
Exemple #2
0
 async def do_loop(self) -> NoReturn:
     await self.bot.wait_until_ready()
     with suppress(asyncio.CancelledError):
         async for _ in repeating_timer(10):
             try:
                 await self.do_autoevents()
                 await self.do_eventloop()
             except asyncio.CancelledError:
                 raise
             except Exception:
                 logger.exception("Error in loop:")
 async def do_loop(self) -> NoReturn:
     try:
         async for _ in repeating_timer(60):
             try:
                 await self.check_subscriptions()
             except asyncio.CancelledError:
                 raise
             except Exception:
                 logger.exception("Error in loop:")
     except asyncio.CancelledError:
         return