mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
refactor(scheduler): extract cron scheduling logic to shared helper
Extract the shouldRunNow() method from ScheduledJobManager and ServerManagerJob into a reusable shouldRunCronNow() helper function. This centralizes cron scheduling logic and enables consistent deduplication behavior across all scheduled job types. - Create shouldRunCronNow() helper in bootstrap/helpers/shared.php with timezone and dedup support - Refactor ScheduledJobManager and ServerManagerJob to use the shared helper - Add ScheduledJobDiagnostics command for inspecting cache state and scheduling decisions across all scheduled jobs - Simplify shouldRunNow tests to directly test the helper function - Add DockerCleanupJob test for error handling and execution tracking - Increase scheduled log retention from 1 to 7 days
This commit is contained in:
1 parent
89f2b83104
commit
f8f27fff13
8 files changed
+446
-317
No files matched your search
+1
-1
@@ -123,7 +123,7 @@ return [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/scheduled.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 1,
|
||||
'days' => 7,
|
||||
],
|
||||
|
||||
'scheduled-errors' => [
|
||||
|
||||
Reference in new issue
Block a user