Repository navigation
Conversation
PR SummaryMedium Risk Overview
Tests enable metrics explicitly in setup and add coverage for the disabled path. Reviewed by Cursor Bugbot for commit d6fb165. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Default value changed from 10minutos to 24hoursMETRICS_CLEAR_INTERVAL=1440 enables or disables metricsMETRICS_ENABLED=false Max random delay (seconds) before run clear metricsMETRICS_CLEAR_STAGGER_MAX_SECONDS=60 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d6fb165. Configure here.
|
|
||
| // 5 minutes is recommended in https://laravel.com/docs/12.x/horizon#metrics | ||
| $schedule->command('horizon:snapshot')->everyFiveMinutes(); | ||
| $event->runInBackground()->withoutOverlapping($clearInterval); |
There was a problem hiding this comment.
Stagger overlaps short clear intervals
Low Severity
withoutOverlapping expires after clear_interval minutes while --stagger may sleep for the full interval. With METRICS_CLEAR_INTERVAL=1 (or 2) and the default 60s stagger cap, the mutex can expire while the first metrics:clear is still sleeping or wiping, so the next schedule starts a second clear against the same Redis keys.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d6fb165. Configure here.







Issue & Reproduction Steps
Scheduled metrics:clear ran simultaneously on every pod and tenant, spiking shared Redis.
Related Tickets & Packages