From df4dd7c1cf457e47615ac687f4e97c1ef24d9b30 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 29 Dec 2023 11:57:45 +0100 Subject: Don't archive games that were abandoned early. --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 844513c..9cf75c2 100644 --- a/server.js +++ b/server.js @@ -2382,12 +2382,13 @@ const QUERY_PURGE_ACTIVE_GAMES = SQL(` `) // don't keep solo games in archive +// don't keep games abandoned in the first turns const QUERY_PURGE_FINISHED_GAMES = SQL(` delete from games where status > 1 - and not is_opposed + and ( not is_opposed or moves <= player_count * 3 ) and julianday(mtime) < julianday('now', '-10 days') `) -- cgit v1.2.3