3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 15:45:03 +00:00

Small tweak to message cleanup

This commit is contained in:
Dragory 2020-05-28 02:30:03 +03:00
parent e887c6bf60
commit 4a75235b63

View file

@ -32,6 +32,7 @@ async function cleanup() {
qb.andWhere(`posted_at <= (NOW() - INTERVAL ${RETENTION_PERIOD}000 MICROSECOND)`);
}),
)
.limit(100_000) // To avoid long table locks, delete max 100,000 rows at once
.delete()
.execute();