persist only changed games
This commit is contained in:
parent
1ac9be4307
commit
6676dcc933
2 changed files with 42 additions and 22 deletions
|
|
@ -181,7 +181,7 @@ wss.listen()
|
|||
// persist games in fixed interval
|
||||
const persistInterval = setInterval(() => {
|
||||
console.log('Persisting games...');
|
||||
Game.persistAll()
|
||||
Game.persistChangedGames()
|
||||
}, config.persistence.interval)
|
||||
|
||||
const gracefulShutdown = (signal) => {
|
||||
|
|
@ -191,7 +191,7 @@ const gracefulShutdown = (signal) => {
|
|||
clearInterval(persistInterval)
|
||||
|
||||
console.log('persisting games...')
|
||||
Game.persistAll()
|
||||
Game.persistChangedGames()
|
||||
|
||||
console.log('shutting down webserver...')
|
||||
server.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue