preserve threads we've participated in
This commit is contained in:
parent
2769d59e91
commit
c6cef9e79e
4
honk.go
4
honk.go
|
@ -1342,8 +1342,8 @@ func cleanupdb() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expdate := time.Now().UTC().Add(-30 * 24 * time.Hour).Format(dbtimeformat)
|
expdate := time.Now().UTC().Add(-30 * 24 * time.Hour).Format(dbtimeformat)
|
||||||
doordie(db, "delete from donks where honkid in (select honkid from honks where dt < ? and whofore = 0)", expdate)
|
doordie(db, "delete from donks where honkid in (select honkid 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 honks where dt < ? and whofore = 0", expdate)
|
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)")
|
doordie(db, "delete from files where fileid not in (select fileid from donks)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue