mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
feat(timer): runLoop 热加载并发实例与运行时配置参数
TimerBase 实现 shouldExecuteTask 手动触发原子消费、reloadRequestList 合并式扩缩容、runLoop 脏标记检测+定时兜底+有效域钳制+drain 优雅缩容+checkTriggerTtl 超时复位。config/timer.php 新增 trigger_ttl/force_reload_interval/drain_max_lifetime 三参数。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -12,8 +12,16 @@ $config = [
|
||||
'max_handles' => 100, // curl multi 最大并发句柄数
|
||||
'select_timeout' => 0.001, // curl_multi_select 超时(秒)
|
||||
|
||||
// T6: runLoop 热加载配置
|
||||
'force_reload_interval' => (int) Env::get('timer.force_reload_interval', 15), // 兜底 reload 间隔(秒),防 cache 丢失导致脏标记漏检
|
||||
'trigger_ttl' => (int) Env::get('timer.trigger_ttl', 300), // 手动触发 TTL(秒),超时未消费自动复位 manual_trigger
|
||||
|
||||
// 清理日志保留天数(debug_log 表)
|
||||
'clear_log_days' => Env::get('timer.clear_log_days', 3),
|
||||
|
||||
// T7: drain 最长存活上限(秒),draining 实例超过该时长强制移除(防永不 drain)
|
||||
// 默认与任务 timeout 一致(86400s),可通过 .env timer.drain_max_lifetime 覆盖
|
||||
'drain_max_lifetime' => (int) Env::get('timer.drain_max_lifetime', 86400),
|
||||
];
|
||||
|
||||
return $config;
|
||||
|
||||
Reference in New Issue
Block a user