From: Benjamin Auder Date: Sat, 15 Feb 2020 23:29:15 +0000 (+0100) Subject: Try to switch off cleanGamesDb X-Git-Url: https://git.auder.net/doc/%7B%7B%20asset%28%27mixstore/css/static/current/git-logo.png?a=commitdiff_plain;h=0f7011a242853b1d23a8cd279bb3c3373813198f;p=vchess.git Try to switch off cleanGamesDb --- diff --git a/server/bin/www b/server/bin/www index 9fd23a44..2f7328ec 100755 --- a/server/bin/www +++ b/server/bin/www @@ -31,7 +31,7 @@ var GameModel = require("../models/Game"); cron.schedule('0 0 0 * * *', function() { // Remove unlogged users and unstarted games every 24h UserModel.cleanUsersDb(); - GameModel.cleanGamesDb(); + //GameModel.cleanGamesDb(); //TODO: a CRON task is causing problems on the server }); /** diff --git a/server/models/Game.js b/server/models/Game.js index 27f5d1e3..daae61c0 100644 --- a/server/models/Game.js +++ b/server/models/Game.js @@ -275,7 +275,7 @@ const GameModel = const day = 86400000; db.serialize(function() { let query = - "SELECT id,created " + + "SELECT id, created " + "FROM Games "; db.all(query, (err,games) => { games.forEach(g => {