Run message cleanup more frequently with a lower limit
This commit is contained in:
parent
26f1042b8e
commit
bf3cae2201
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ import moment from "moment-timezone";
|
|||
import { DAYS, MINUTES } from "../utils";
|
||||
import { isAPI } from "../globals";
|
||||
|
||||
const CLEANUP_INTERVAL = 5 * MINUTES;
|
||||
const CLEANUP_INTERVAL = 1 * MINUTES;
|
||||
|
||||
/**
|
||||
* How long message edits, deletions, etc. will include the original message content.
|
||||
|
@ -42,7 +42,7 @@ async function cleanup() {
|
|||
qb.andWhere("is_permanent = 0");
|
||||
}),
|
||||
)
|
||||
.limit(100_000) // To avoid long table locks, limit the amount of messages deleted at once
|
||||
.limit(10_000) // To avoid long table locks, limit the amount of messages deleted at once
|
||||
.delete()
|
||||
.execute();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue