fix(runner): 稳定异步任务重启恢复
ci / verify (pull_request) Successful in 10m32s

避免恢复任务将已到期的 next_run_at 误插入 River scheduled 状态,并使用专用模型隔离重启集成测试。\n\n验证:Go 全量测试、govulncheck、pnpm lint/test/build/audit、Compose、镜像、迁移、流水线及 SemVer 门禁全部通过。
This commit is contained in:
2026-07-21 11:29:56 +08:00
parent 1e55f7df8b
commit 8c38714296
3 changed files with 50 additions and 4 deletions
@@ -1654,6 +1654,17 @@ WHERE m.platform_id = $1::uuid
t.Fatal("task progress callback outbox should receive events")
}
restartModel := "worker-restart-" + suffixText
createSimulationTextPlatformModel(
t,
server.URL,
loginResponse.AccessToken,
"openai-worker-restart-"+suffixText,
"OpenAI Worker Restart",
restartModel,
1,
nil,
)
var restartAsyncTask struct {
TaskID string `json:"taskId"`
Task struct {
@@ -1663,7 +1674,7 @@ WHERE m.platform_id = $1::uuid
} `json:"task"`
}
doJSONWithHeaders(t, server.URL, http.MethodPost, "/api/v1/responses", apiKeyResponse.Secret, map[string]any{
"model": defaultTextModel,
"model": restartModel,
"runMode": "simulation",
"simulation": true,
"simulationDurationMs": 2000,