feat: 任务/模板备注展示与 Worker 运行数量配置(Codex gpt-6-astra 重写)

This commit is contained in:
RuoJi6 committed 2026-10-24 21:46:03 +08:00
1 parent ba3025d04f
commit a1dc362bae
21 files changed
+332 -32

No files matched your search

+8 -1
View File
@@ -746,7 +746,7 @@ func (e *Engine) ReadyFor(t *Task) bool {
// but no-op until an LLM is configured (so a task created while idle picks up
// automatically once LLM is set from the UI).
func (e *Engine) Run(ctx context.Context, t *Task) {
workers := e.m.Workers()
workers := workerCountForTask(t, e.m.Workers())
e.deleteMu.RLock()
if e.IsDeleting(t.ID) {
e.deleteMu.RUnlock()
@@ -776,6 +776,13 @@ func (e *Engine) Run(ctx context.Context, t *Task) {
}
}
func workerCountForTask(t *Task, global int) int {
if t != nil && t.WorkerCount > 0 {
return t.WorkerCount
}
return global
}
// plannerHeartbeatInterval 解析任务的 planner 心跳间隔。db.CreateTask 已归一
// (低于 600 一律抬到 600);这里再兜一次底,防内存态异常值。
func plannerHeartbeatInterval(t *Task) time.Duration {