diff options
Diffstat (limited to 'tools/purge.sql')
-rw-r--r-- | tools/purge.sql | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/purge.sql b/tools/purge.sql index 3e0c898..2a95f01 100644 --- a/tools/purge.sql +++ b/tools/purge.sql @@ -2,6 +2,8 @@ attach database 'db' as live; +pragma live.busy_timeout=10000; + create temporary view prune_snap_list as select distinct game_id @@ -26,12 +28,8 @@ create temporary view prune_all_list as ) ; -begin; - select 'PURGE SNAPS FROM ' || count(1) from prune_snap_list; delete from live.game_snap where game_id in (select game_id from prune_snap_list); select 'PURGE ALL FROM ' || count(1) from prune_all_list; update live.games set status = 3 where game_id in (select game_id from prune_all_list); - -commit; |