#feature: update AI log analysis

This commit is contained in:
2026-02-11 11:00:32 +08:00
parent ddd0f531fd
commit 53bca7d609
18 changed files with 688 additions and 262 deletions

View File

@@ -23,7 +23,7 @@ Artisan::command('inspire', function () {
// Git Monitor - 每 10 分钟检查 release 分支
Schedule::command('git-monitor:check')
->everyTenMinutes()
->withoutOverlapping()
->withoutOverlapping(10)
->runInBackground()
->description('git-monitor-check')
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-check'));
@@ -35,8 +35,8 @@ Schedule::command('git-monitor:cache')
->description('git-monitor-cache')
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-cache'));
// SLS 日志分析 - 每天凌晨 2 点执行
Schedule::command('log-analysis:run --from="-24h" --to="now" --query="ERROR or WARNING" --push')
// SLS 日志分析 - 每天凌晨 2 点执行(日志分析 + 代码分析)
Schedule::command('log-analysis:run --from="-24h" --to="now" --query="content.level: ERROR" --mode=logs+code --push')
->dailyAt('02:00')
->withoutOverlapping()
->runInBackground()
@@ -45,9 +45,9 @@ Schedule::command('log-analysis:run --from="-24h" --to="now" --query="ERROR or W
->onFailure(fn() => Log::error('每日日志分析定时任务执行失败'));
// SLS 日志分析 - 每 4 小时执行一次
Schedule::command('log-analysis:run --from="-6h" --to="now" --query="ERROR or WARNING" --push')
Schedule::command('log-analysis:run --from="-6h" --to="now" --query="content.level: ERROR" --push')
->everyFourHours()
->withoutOverlapping()
->withoutOverlapping(60)
->runInBackground()
->description('frequent-log-analysis')
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('frequent-log-analysis'))
@@ -56,7 +56,7 @@ Schedule::command('log-analysis:run --from="-6h" --to="now" --query="ERROR or WA
// Jenkins Monitor - 每分钟检查新构建
Schedule::command('jenkins:monitor')
->everyMinute()
->withoutOverlapping()
->withoutOverlapping(10)
->runInBackground()
->description('jenkins-monitor')
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('jenkins-monitor'));