feat(scheduler): in-process matching scheduler with audit + admin endpoints
- Add in-process scheduler service triggered by ENABLE_SCHEDULER - Record runs in new matching_runs table; throttle per-event and log stats - Add admin endpoints: POST /api/admin/events/:slug/run-now and GET /api/admin/events/:slug/matching-runs - Wire scheduler start/stop in server and add ENV flags + compose defaults - Prisma schema: add MatchingRun model and relation - Update env examples for scheduler configuration
This commit is contained in:
@@ -50,3 +50,11 @@ LOCKOUT_DURATION_MINUTES=15
|
||||
|
||||
# Logging
|
||||
LOG_LEVEL=warn
|
||||
|
||||
# Scheduler
|
||||
# Enable simple in-process scheduler for auto-matching (enable on exactly one replica)
|
||||
ENABLE_SCHEDULER=false
|
||||
# Global tick interval in seconds (e.g., 300 = 5min)
|
||||
SCHEDULER_INTERVAL_SEC=300
|
||||
# Per-event minimum time between runs in seconds to avoid thrashing
|
||||
MATCHING_MIN_INTERVAL_SEC=120
|
||||
|
||||
Reference in New Issue
Block a user