Update log messages
This commit is contained in:
parent
ffc4524127
commit
325a2cb423
1 changed files with 3 additions and 4 deletions
|
|
@ -9,18 +9,17 @@ export function processExit() {
|
||||||
* then if they do, we save the game to disk, if not we just delete it
|
* then if they do, we save the game to disk, if not we just delete it
|
||||||
* completely from the system.
|
* completely from the system.
|
||||||
*/
|
*/
|
||||||
log.info(`Cleaning up games`)
|
log.info(`Cleaning up games`);
|
||||||
for (var gc in games) {
|
for (var gc in games) {
|
||||||
let game = games[gc];
|
let game = games[gc];
|
||||||
if (activeGame(game)) {
|
if (game.ingame && activeGame(game)) {
|
||||||
game.log.debug(`Saving to datastore`);
|
game.log.debug(`Saving to datastore`);
|
||||||
writeFileSync(
|
writeFileSync(
|
||||||
`${conf.datastores.directory}/${game.id}.${conf.datastores.filetype}`,
|
`${conf.datastores.directory}/${game.id}.${conf.datastores.filetype}`,
|
||||||
JSON.stringify(game.toJSON())
|
JSON.stringify(game.toJSON())
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
game.log.debug(`Deleting game`);
|
game.log.debug(`Not saving to datastore`);
|
||||||
delete games[gc];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
log.info(`Done cleaning up games`);
|
log.info(`Done cleaning up games`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue