MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / Release

Method Release

internal/idempotency/store.go:269–276  ·  view source on GitHub ↗

Release drops an OutcomeAcquired claim without recording a response. Use when the caller decided not to perform the side effect (e.g. the request failed validation before any external work happened), so the next caller with the same key can try again with a fresh payload rather than getting OutcomeM

(ctx context.Context, userID, key string)

Source from the content-addressed store, hash-verified

267// Only deletes in_progress rows so it cannot accidentally wipe a
268// completed cache entry.
269func (s *Store) Release(ctx context.Context, userID, key string) error {
270 _, err := s.pool.Exec(ctx,
271 `DELETE FROM idempotency_keys
272 WHERE user_id = $1 AND key = $2 AND status = 'in_progress'`,
273 userID, key,
274 )
275 return err
276}
277
278// Sweep removes completed rows older than TTL. Returns the count
279// deleted. Wire this into the cmd/e2a hourly cleanup loop.

Callers

nothing calls this directly

Implementers 1

Storeinternal/identity/store.go

Calls 1

ExecMethod · 0.65

Tested by

no test coverage detected