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

Method saveApprovalAutoEnqueueIdempotencyAlias

internal/task/manager.go:803–824  ·  view source on GitHub ↗
(
	ctx context.Context,
	taskID string,
	runID string,
	idempotencyKey string,
	actor ActorContext,
)

Source from the content-addressed store, hash-verified

801}
802
803func (m *Service) saveApprovalAutoEnqueueIdempotencyAlias(
804 ctx context.Context,
805 taskID string,
806 runID string,
807 idempotencyKey string,
808 actor ActorContext,
809) error {
810 if err := m.store.SaveTaskRunIdempotency(ctx, RunIdempotency{
811 IdempotencyKey: idempotencyKey,
812 RunID: runID,
813 Origin: actor.Origin,
814 CreatedAt: m.now().UTC(),
815 }); err != nil {
816 return fmt.Errorf(
817 "task: save approval auto-enqueue idempotency alias for task %q run %q: %w",
818 taskID,
819 runID,
820 err,
821 )
822 }
823 return nil
824}
825
826func (m *Service) taskExecutionFromIdempotency(
827 ctx context.Context,

Callers 1

Calls 2

nowMethod · 0.45

Tested by

no test coverage detected