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

Method dispatchTaskRunReleased

internal/task/lease_hooks.go:79–101  ·  view source on GitHub ↗
(
	ctx context.Context,
	run Run,
	taskRecord Task,
	actor ActorContext,
	previous Run,
	reason string,
)

Source from the content-addressed store, hash-verified

77}
78
79func (m *Service) dispatchTaskRunReleased(
80 ctx context.Context,
81 run Run,
82 taskRecord Task,
83 actor ActorContext,
84 previous Run,
85 reason string,
86) {
87 contextPayload := m.taskRunHookContext(run, taskRecord, actor)
88 contextPayload.ReleaseReason = strings.TrimSpace(reason)
89 payload := hookspkg.TaskRunReleasedPayload{
90 PayloadBase: hookspkg.PayloadBase{
91 Event: hookspkg.HookTaskRunReleased,
92 Timestamp: m.now().UTC(),
93 },
94 TaskRunContext: contextPayload,
95 PreviousRunStatus: string(previous.Status.Normalize()),
96 PreviousSessionID: strings.TrimSpace(previous.SessionID),
97 RecoveryReason: strings.TrimSpace(reason),
98 }
99 _, err := m.taskHooks.DispatchTaskRunReleased(taskRunObservationHookContext(ctx), payload)
100 m.reportTaskRunHookFailure(hookspkg.HookTaskRunReleased, err, run, taskRecord)
101}
102
103func (m *Service) dispatchTaskRunCompleted(
104 ctx context.Context,

Callers 4

BlockTaskMethod · 0.95
ForceReleaseRunMethod · 0.95
ReleaseRunLeaseMethod · 0.95

Calls 6

taskRunHookContextMethod · 0.95
nowMethod · 0.45
NormalizeMethod · 0.45

Tested by

no test coverage detected