Open Susannova opened 4 years ago
Not fixed yet
Still a big problem. reload-ext cogs.cog_tasks
also causes the before_loop to run multiple times. Then a restart can take for ever because of rate limiting in Riotwatcher.
Maybe we can just do an hourly loop on the print_leaderboard_loop (https://github.com/Susannova/Discord_Bot/blob/34b70d0fe33ed27d822cac030a592dab11a79236/cogs/cog_tasks.py#L153) and just set a date at which to actually run this command in the state. And then just hourly compare the date in the state with the current date. With this we can avoid to have this really long sleep.
https://github.com/Susannova/Discord_Bot/blob/4dbe5f52638cc47779344b5a81485743a60e15dd/cogs/cog_tasks.py#L182