delete old muted threads from db
This commit is contained in:
parent
38b44ebef6
commit
686d139f54
3
honk.go
3
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
|
||||
|
|
Loading…
Reference in New Issue