docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// 仅 worker 明确未开始执行的忙碌准入可持久回队;已完成步骤结果保留供恢复后继续。
|
||||
package platform
|
||||
|
||||
import (
|
||||
@@ -6,6 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// canvasRunResults 读取非 queued 终态与文本/资产输出;遇仍 running 步骤拒绝恢复,避免重复调用未定执行。
|
||||
func (s *service) canvasRunResults(ctx context.Context, run canvasQueueRun) (map[string]canvasStepResult, error) {
|
||||
rows, err := s.db.QueryContext(ctx, `SELECT id,status,output FROM canvas_ai_steps WHERE project=$1 AND workspace_id=$2 AND run_id=$3 ORDER BY ordinal`, run.Project, run.Workspace, run.ID)
|
||||
if err != nil {
|
||||
@@ -41,6 +43,8 @@ func (s *service) canvasRunResults(ctx context.Context, run canvasQueueRun) (map
|
||||
|
||||
// A 429 codex_busy response proves the worker did not invoke the CLI. Only this
|
||||
// admission failure can return a step to the persistent queue for safe retry.
|
||||
// requeueCanvasStep 核对当前 run 租约和取消位,将唯一 running 步退回 queued,并把 run 延迟五秒可认领。
|
||||
// 返回 true 表示已提交回队,外层必须结束当前执行;旧结果和逻辑身份不会重建。
|
||||
func (s *service) requeueCanvasStep(ctx context.Context, run canvasQueueRun, step canvasAIStepPlan) (bool, error) {
|
||||
tx, err := s.db.BeginTx(ctx, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user