Susannova / Discord_Bot

A configurable discord bot that can run on multiple servers simultaneously.
MIT License
2 stars 1 forks source link

Wait until 18:00 to plot causes an exception if program is aborted before timer is finished. #84

Open Susannova opened 4 years ago

Susannova commented 4 years ago

https://github.com/Susannova/Discord_Bot/blob/4dbe5f52638cc47779344b5a81485743a60e15dd/cogs/cog_tasks.py#L182

Susannova commented 4 years ago

Not fixed yet

Susannova commented 4 years ago

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.

NickWittig commented 3 years ago

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.