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

Method checkDependencies

pkg/executionplan/executor.go:370–392  ·  view source on GitHub ↗

checkDependencies 检查步骤依赖是否满足

(plan *ExecutionPlan, step *Step)

Source from the content-addressed store, hash-verified

368
369// checkDependencies 检查步骤依赖是否满足
370func (e *Executor) checkDependencies(plan *ExecutionPlan, step *Step) bool {
371 if len(step.DependsOn) == 0 {
372 return true
373 }
374
375 for _, depID := range step.DependsOn {
376 found := false
377 for i := range plan.Steps {
378 if plan.Steps[i].ID == depID {
379 if plan.Steps[i].Status != StepStatusCompleted {
380 return false
381 }
382 found = true
383 break
384 }
385 }
386 if !found {
387 return false
388 }
389 }
390
391 return true
392}
393
394// checkDependenciesWithMap 使用完成映射检查依赖
395func (e *Executor) checkDependenciesWithMap(step *Step, completed map[string]bool) bool {

Callers 1

executeSequentialMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected