#feature: update log format
This commit is contained in:
@@ -26,7 +26,6 @@ Schedule::command('git-monitor:check')
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('git-monitor-check')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/git-monitor-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-check'));
|
||||
|
||||
// Git Monitor - 每天凌晨 2 点刷新 release 缓存
|
||||
@@ -34,7 +33,6 @@ Schedule::command('git-monitor:cache')
|
||||
->dailyAt('02:00')
|
||||
->withoutOverlapping()
|
||||
->description('git-monitor-cache')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/git-monitor-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-cache'));
|
||||
|
||||
// SLS 日志分析 - 每天凌晨 2 点执行
|
||||
@@ -43,7 +41,6 @@ Schedule::command('log-analysis:run --from="-24h" --to="now" --query="ERROR or W
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('daily-log-analysis')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/log-analysis-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('daily-log-analysis'))
|
||||
->onFailure(fn() => Log::error('每日日志分析定时任务执行失败'));
|
||||
|
||||
@@ -53,7 +50,6 @@ Schedule::command('log-analysis:run --from="-6h" --to="now" --query="ERROR or WA
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('frequent-log-analysis')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/log-analysis-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('frequent-log-analysis'))
|
||||
->onFailure(fn() => Log::error('SLS 日志分析定时任务执行失败'));
|
||||
|
||||
@@ -63,7 +59,6 @@ Schedule::command('jenkins:monitor')
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('jenkins-monitor')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/jenkins-monitor-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('jenkins-monitor'));
|
||||
|
||||
// 定时任务刷新 - 每天凌晨 3 点刷新定时任务列表
|
||||
@@ -71,13 +66,4 @@ Schedule::command('scheduled-task:refresh')
|
||||
->dailyAt('03:00')
|
||||
->withoutOverlapping()
|
||||
->description('scheduled-task-refresh')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/scheduled-tasks-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('scheduled-task-refresh'));
|
||||
|
||||
// 日志清理 - 每天凌晨 4 点清理 7 天前的定时任务日志
|
||||
Schedule::command('logs:clean-scheduled-tasks --days=7')
|
||||
->dailyAt('04:00')
|
||||
->withoutOverlapping()
|
||||
->description('logs-cleanup')
|
||||
->appendOutputTo(storage_path('logs/scheduled-tasks/scheduled-tasks-' . date('Y-m-d') . '.log'))
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('logs-cleanup'));
|
||||
|
||||
Reference in New Issue
Block a user