feat: production hardening — background fights, queue tuning, CORS, cycling taglines
- Background fight loop: mock bots auto-fight every ~45s for site activity - Quiet hours (2-8 UTC) run 4x slower, jitter prevents robotic timing - Configurable via FIGHT_LOOP_ENABLED, FIGHT_LOOP_INTERVAL_MS - Queue timeout: 30s in prod (was 3s), configurable via QUEUE_TIMEOUT_MS - CORS: env-configurable via CORS_ORIGIN (default '*') - Homepage: 40 cycling taglines with typewriter effect - docker-compose: document all new env vars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
6bf9fe27b3
commit
3e74712c44
@@ -17,7 +17,8 @@ interface QueueEntry {
|
||||
const waitingQueue: QueueEntry[] = []
|
||||
|
||||
// How long a bot waits before getting matched against a mock bot
|
||||
const QUEUE_TIMEOUT_MS = 3_000
|
||||
// In production, give real bots time to match (30s). In dev, fall back fast (3s).
|
||||
const QUEUE_TIMEOUT_MS = Number(process.env.QUEUE_TIMEOUT_MS) || (process.env.NODE_ENV === 'production' ? 30_000 : 3_000)
|
||||
|
||||
// Post-fight cooldown tracking
|
||||
const fightCooldowns = new Map<string, number>()
|
||||
|
||||
Reference in New Issue
Block a user