MCPcopy Create free account
hub / github.com/compozy/agh / loadTaskRuntimeState

Method loadTaskRuntimeState

internal/task/manager.go:1114–1131  ·  view source on GitHub ↗
(
	ctx context.Context,
	record Task,
)

Source from the content-addressed store, hash-verified

1112}
1113
1114func (m *Service) loadTaskRuntimeState(
1115 ctx context.Context,
1116 record Task,
1117) ([]Run, Status, error) {
1118 runs, err := m.store.ListTaskRuns(ctx, RunQuery{TaskID: record.ID})
1119 if err != nil {
1120 return nil, "", err
1121 }
1122 dependencies, err := m.store.ListDependencies(ctx, record.ID)
1123 if err != nil {
1124 return nil, "", err
1125 }
1126 status, err := m.canonicalTaskStatus(ctx, record, dependencies, runs)
1127 if err != nil {
1128 return nil, "", err
1129 }
1130 return runs, status, nil
1131}
1132
1133func cancellationPropagationRoot(rootTaskID string, idx int) string {
1134 if idx == 0 {

Callers 2

ensureTaskCancelableMethod · 0.95
cancelTaskTreeRecordMethod · 0.95

Calls 3

canonicalTaskStatusMethod · 0.95
ListTaskRunsMethod · 0.65
ListDependenciesMethod · 0.65

Tested by

no test coverage detected