From 686d139f544e802c9a21c241fd20663d16618f8d Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 28 Jul 2019 18:42:21 -0400 Subject: [PATCH] delete old muted threads from db --- honk.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/honk.go b/honk.go index 15ceadf..6e558f8 100644 --- a/honk.go +++ b/honk.go @@ -1528,6 +1528,9 @@ func cleanupdb(arg string) { doordie(db, "delete from honks where dt < ? and whofore = 0 and convoy not in (select convoy from honks where whofore = 2 or whofore = 3)", expdate) } doordie(db, "delete from files where fileid not in (select fileid from donks)") + for _, u := range allusers() { + doordie(db, "delete from zonkers where userid = ? and wherefore = 'zonvoy' and zonkerid < (select zonkerid from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 1 offset 200)", u.UserID, u.UserID) + } } var stmtHonkers, stmtDubbers, stmtSaveHonker, stmtUpdateFlavor, stmtUpdateCombos *sql.Stmt