gbtami / pychess-variants

Chess variant server
https://www.pychess.org
GNU Affero General Public License v3.0
236 stars 114 forks source link

Survive server restart #1314

Closed gbtami closed 2 weeks ago

gbtami commented 7 months ago

Heroku initiates daily server restart in random times. See https://devcenter.heroku.com/articles/dynos#restarting Stuff needs to be saved/restored are

mattgatto commented 2 weeks ago

save-regular-seeks-across-restart.diff.txt

There's almost certainly a more elegant way to do it than adding the @property seek_json to seek.py, but, I haven't figured that out yet. It does work, and it fixes the bug gbtami mentioned on discord, where, if there's no correspondence seeks (because they got deleted in current server session), the last correspondence seeks from the database get restored, when the server restarts.

mattgatto commented 2 weeks ago

gbtami-pychess-discord-correspondence-seeks-bug

gbtami commented 2 weeks ago

Seems OK for me. PR please :)

gbtami commented 2 weeks ago

Thx!