🔄 sync progress before stale job reconciliation

This commit is contained in:
eust-w 2026-07-13 18:27:57 +08:00
parent 4fd8796b9d
commit 1678e33d8f

View File

@ -1440,9 +1440,11 @@ func (runtime *Runtime) reconcileActiveRun(ctx context.Context, candidate domain
return false, nil
}
}
if run.Status == domain.RunStatusRunning && activeExecution != nil && activeExecution.Status == domain.NodeExecutionStatusRunning && !isStaleQueuedNodeExecution(*activeExecution, 2*time.Minute) {
if run.Status == domain.RunStatusRunning && activeExecution != nil && activeExecution.Status == domain.NodeExecutionStatusRunning {
runtime.syncActiveRunProgress(ctx, run)
return false, nil
if !isStaleQueuedNodeExecution(*activeExecution, 2*time.Minute) {
return false, nil
}
}
if strings.TrimSpace(run.CurrentNodeID) == "" {
if updatedAt, ok := parseRFC3339Nano(run.UpdatedAt); ok && time.Since(updatedAt) < 2*time.Minute {