sprx97 / OldTimeHockey

Website and scripts for OldTimeHockey fantasy hockey league.
http://www.roldtimehockey.com
3 stars 5 forks source link

Bot randomly stops reporting scores on busy nights... #32

Closed sprx97 closed 6 years ago

sprx97 commented 6 years ago

Need to add some debug statements, but gonna be hard. Maybe create output file.

sprx97 commented 6 years ago

Seems like the check_scores call is blocking for too long, which causes me to disconnect from Discord and quit... Sounds like the heartbeat is ~60 seconds.

Looks like the 0.16 version of discord.py doesn't support setting the heartbeat_interval variable. 1.0.0a does, but that would involve a large rewrite. For now I just edited the library to use 120 instead of whatever its getting from heartbeat_interval (which I believe is 60).

sprx97 commented 6 years ago

Fixed it by making each game a separate blocking call, instead of one blocking call for all the games.