diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-29 11:57:45 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-01 16:47:38 +0100 |
commit | df4dd7c1cf457e47615ac687f4e97c1ef24d9b30 (patch) | |
tree | 61590cf870ba105c5d1efe0e3a354d529d3e7077 /server.js | |
parent | 346383dad99ad34fcb1c382eb73ee327732fc990 (diff) | |
download | server-df4dd7c1cf457e47615ac687f4e97c1ef24d9b30.tar.gz |
Don't archive games that were abandoned early.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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') `) |