Skip to content

Commit 103ff7f

Browse files
committed
Delete 5000 messages at a time, rather than 1000.
1 parent 10c6f80 commit 103ff7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ts/data/data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,10 @@ async function removeAllMessagesInConversation(conversationId: string): Promise<
491491

492492
let messages;
493493
do {
494-
// Yes, we really want the await in the loop. We're deleting 500 at a
495-
// time so we don't use too much memory.
494+
// Yes, we really want the await in the loop. We're deleting 5000 at a
495+
// time so we don't use too much memory.
496496
// eslint-disable-next-line no-await-in-loop
497-
messages = await getLastMessagesByConversation(conversationId, 1000, false);
497+
messages = await getLastMessagesByConversation(conversationId, 5000, false);
498498
if (!messages.length) {
499499
return;
500500
}

0 commit comments

Comments
 (0)