Skip to content

Conversation

@alfetopito
Copy link
Contributor

Summary

After #58, it's possible to see that the cleanup is failing because too much is being deleted at once.

This change splits it into 1k batches.

Testing

Same as #58

@alfetopito alfetopito self-assigned this Mar 14, 2025
@alfetopito alfetopito requested a review from a team March 14, 2025 12:08
@alfetopito
Copy link
Contributor Author

Merging to test right away, please post merge review

@alfetopito alfetopito merged commit 66b879e into main Mar 14, 2025
3 checks passed
@alfetopito alfetopito deleted the feat/batch-deletion branch March 14, 2025 12:17
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve

where: {
id: {
$in: expiredNotifications.map((n) => n.id),
const BATCH_SIZE = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you want to move this to the top f the file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore, since it has been merged and is not important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants