MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / RecoverQueuedTransactions

Method RecoverQueuedTransactions

queue_recovery.go:128–135  ·  view source on GitHub ↗

RecoverQueuedTransactions triggers an immediate recovery of stuck queued transactions using the provided threshold. This is exposed for the manual trigger API endpoint.

(ctx context.Context, threshold time.Duration)

Source from the content-addressed store, hash-verified

126// RecoverQueuedTransactions triggers an immediate recovery of stuck queued transactions
127// using the provided threshold. This is exposed for the manual trigger API endpoint.
128func (b *LedgerForge) RecoverQueuedTransactions(ctx context.Context, threshold time.Duration) (int, error) {
129 if threshold < 2*time.Minute {
130 threshold = 2 * time.Minute
131 }
132
133 processor := NewQueuedTransactionRecoveryProcessor(b)
134 return processor.recoverWithThreshold(ctx, threshold), nil
135}
136
137// recoverWithThreshold loads currently stuck queued transactions and reprocesses them serially.
138func (p *QueuedTransactionRecoveryProcessor) recoverWithThreshold(ctx context.Context, threshold time.Duration) int {

Callers

nothing calls this directly

Tested by

no test coverage detected