MCPcopy Create free account
hub / github.com/astercloud/aster / MarkStepCompleted

Method MarkStepCompleted

pkg/executionplan/types.go:214–225  ·  view source on GitHub ↗

MarkStepCompleted 标记步骤完成

(index int, result any)

Source from the content-addressed store, hash-verified

212
213// MarkStepCompleted 标记步骤完成
214func (p *ExecutionPlan) MarkStepCompleted(index int, result any) {
215 if step := p.GetStep(index); step != nil {
216 now := time.Now()
217 step.Status = StepStatusCompleted
218 step.Result = result
219 step.CompletedAt = &now
220 if step.StartedAt != nil {
221 step.DurationMs = now.Sub(*step.StartedAt).Milliseconds()
222 }
223 p.UpdatedAt = now
224 }
225}
226
227// MarkStepFailed 标记步骤失败
228func (p *ExecutionPlan) MarkStepFailed(index int, err error) {

Callers 2

TestMarkStepCompletedFunction · 0.95
executeStepMethod · 0.80

Calls 1

GetStepMethod · 0.95

Tested by 1

TestMarkStepCompletedFunction · 0.76