merge: maestro/tsk_N5wO3Armums2 [重试与超时策略细化(可配 + 退避)]
# Conflicts: # src/api/server.ts # test/store.test.ts
This commit is contained in:
@@ -52,6 +52,8 @@ export function buildServer(opts: ApiOptions): FastifyInstance {
|
||||
verifyCmd: b.verifyCmd === undefined ? undefined : (b.verifyCmd === null ? null : String(b.verifyCmd)),
|
||||
autonomy: b.autonomy as never, model: b.model === undefined ? undefined : (b.model === null ? null : String(b.model)),
|
||||
concurrency: b.concurrency === undefined ? undefined : Number(b.concurrency),
|
||||
maxRetries: b.maxRetries === undefined ? undefined : Number(b.maxRetries),
|
||||
timeoutMs: b.timeoutMs === undefined ? undefined : Number(b.timeoutMs),
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -73,6 +75,8 @@ export function buildServer(opts: ApiOptions): FastifyInstance {
|
||||
if (b.verifyCmd !== undefined) patch.verifyCmd = b.verifyCmd === null ? null : String(b.verifyCmd);
|
||||
if (b.model !== undefined) patch.model = b.model === null ? null : String(b.model);
|
||||
if (b.logo !== undefined) patch.logo = b.logo === null || b.logo === '' ? null : String(b.logo);
|
||||
if (b.maxRetries !== undefined) patch.maxRetries = Number(b.maxRetries);
|
||||
if (b.timeoutMs !== undefined) patch.timeoutMs = Number(b.timeoutMs);
|
||||
return projectOut(store.patchProject(id, patch));
|
||||
});
|
||||
|
||||
@@ -238,6 +242,12 @@ export function buildServer(opts: ApiOptions): FastifyInstance {
|
||||
return store.deleteTask(id);
|
||||
});
|
||||
|
||||
// needs_attention 任务一键重投:重置重试基线 + 转 queued,让编排器下一轮重新领取
|
||||
app.post('/api/tasks/:id/requeue', (req) => {
|
||||
const { id } = req.params as { id: string };
|
||||
return store.requeueTask(id);
|
||||
});
|
||||
|
||||
// 审批闸:accept / reject(reject 必带 reason)
|
||||
// exec 闸的 accept = 通过并合并(PR 闭环):先 merge 再 decide;merge 失败 → 400,任务保留在审核闸。
|
||||
app.post('/api/tasks/:id/decide', async (req) => {
|
||||
|
||||
Reference in New Issue
Block a user