mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-03 04:11:51 +08:00
feat: 任务/模板备注展示与 Worker 运行数量配置(Codex gpt-6-astra 重写)
This commit is contained in:
1 parent
ba3025d04f
commit
a1dc362bae
21 files changed
+332
-32
No files matched your search
+8
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user