fix(collector): add 0.3s throttle between multi-project command polls to prevent rate limit bursts

This commit is contained in:
Variet Worker
2026-03-12 21:11:05 +09:00
parent 5a4ac1bf9b
commit bcc29f9331

View File

@@ -227,6 +227,7 @@ class CollectorBridge:
fname = f"{cmd_id}.json"
self.local.write_json("commands", fname, cmd)
logger.info(f"[COLLECTOR] ← Gateway: command [{project}] {cmd.get('text', '?')[:30]}")
await asyncio.sleep(0.3) # Throttle between projects to avoid rate limit bursts
except Exception as e:
logger.error(f"[COLLECTOR] poll_commands error: {e}")