Root cause: When 3+ projects generated pending simultaneously, Bot's pending_approval_scanner made 20-40 Discord API calls in one tick (sequential await), triggering Discord 429 rate limits which blocked the entire scanner for 10-30s, freezing ALL signal delivery. Two fixes: 1. _get_channel(): Replace guild.fetch_channels() (API call) with discord.utils.get(guild.channels) (in-memory cache). Eliminates redundant API calls + Lock contention when multiple projects arrive. 2. pending_approval_scanner: Per-tick caps (5 new + 5 status) prevent one tick from monopolizing Discord API quota. Excess items are naturally processed in subsequent 3-second ticks.
46 KiB
46 KiB