Skip to content

Superban cleanup#3704

Merged
todwadd merged 3 commits intomainfrom
superban-cleanup
Mar 4, 2026
Merged

Superban cleanup#3704
todwadd merged 3 commits intomainfrom
superban-cleanup

Conversation

@todwadd
Copy link
Collaborator

@todwadd todwadd commented Mar 4, 2026

Reverted the original PR because the notification cleanup query blocked the superban response for 10-15min on prolific spammers. This is the same code but fire-and-forget (non-blocking), plus an early return guard to prevent duplicate runs.

This also means you can no longer superban an already banned user (to prevent notification search query spam)

todwadd added 3 commits March 3, 2026 13:50
After deleting a spammer's comments, delete their notifications from
affected users (market followers + market creators) from the last 3 days.
Time-bounded to avoid scanning the full notifications table.
Wrapped in try/catch so failures won't break the rest of superban.
- Changed notification cleanup from await to fire-and-forget so superban
  returns immediately (was causing 10-15min hangs on prolific spammers)
- Added early return if user already has all 3 ban types active to prevent
  redundant cleanup runs
@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev Ready Ready Preview, Comment Mar 4, 2026 5:11am
prod Ready Ready Preview, Comment Mar 4, 2026 5:11am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Mar 4, 2026 5:11am

Request Review

@todwadd todwadd merged commit ae08629 into main Mar 4, 2026
5 checks passed
@todwadd todwadd deleted the superban-cleanup branch March 4, 2026 05:13
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.

1 participant