add code to reconnect to database if connection is gettring broken or database getting a reboot
This commit is contained in:
@@ -138,6 +138,8 @@ class Server:
|
||||
game_board.save(
|
||||
StorageLoader.build(self.storage_type),
|
||||
file_path=os.path.join(self.data_path, 'data'),
|
||||
database=os.getenv("EDGEDB_DATABASE", None),
|
||||
tls_security=None
|
||||
)
|
||||
|
||||
print("GAME ENDED: Winner is", [ x["name"] for x in game_state["board"]['snakes']])
|
||||
|
||||
Reference in New Issue
Block a user