feat(timer): 新增 run_type 调度、host_id 投递和日志清理

T7: TimerBase shouldExecuteTask() - main/auto/all/manual/disabled modes
    with two-phase DB row lock for auto mode
T8: TimerControllerBase - host_id param, logStart/logEnd methods
    TimerServiceBase - inject host_id into site URLs
T9: TimerLogClean command - php think admin:timer:log:clean --days=30
This commit is contained in:
augushong
2026-05-26 02:41:10 +08:00
parent abeac2c3cb
commit 25fab093fa
7 changed files with 215 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ namespace base\common\service;
use app\admin\model\SystemTimerConfig;
use app\common\model\VirtualModel;
use app\common\service\HostService;
class TimerServiceBase
{
@@ -117,6 +118,7 @@ class TimerServiceBase
$params = [
'concurrency_id' => $i,
'concurrency_count' => $concurrency,
'host_id' => HostService::getNodeId(),
];
// 处理target
if ($config_item['type'] == 'site') {