mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-02 20:01:51 +08:00
fix: 按评审补齐 mock 校验、Worker 上限保护与测试(Codex gpt-6-sol)
This commit is contained in:
1 parent
a1dc362bae
commit
2e6ceddf95
8 files changed
+125
-21
No files matched your search
@@ -778,6 +778,11 @@ func (e *Engine) Run(ctx context.Context, t *Task) {
|
||||
|
||||
func workerCountForTask(t *Task, global int) int {
|
||||
if t != nil && t.WorkerCount > 0 {
|
||||
// Direct database edits can bypass validation; cap those values so the
|
||||
// engine never starts more than the supported per-task worker count.
|
||||
if t.WorkerCount > db.MaxTaskWorkerCount {
|
||||
return db.MaxTaskWorkerCount
|
||||
}
|
||||
return t.WorkerCount
|
||||
}
|
||||
return global
|
||||
|
||||
Reference in new issue
Block a user