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)
| 126 | // RecoverQueuedTransactions triggers an immediate recovery of stuck queued transactions |
| 127 | // using the provided threshold. This is exposed for the manual trigger API endpoint. |
| 128 | func (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. |
| 138 | func (p *QueuedTransactionRecoveryProcessor) recoverWithThreshold(ctx context.Context, threshold time.Duration) int { |
nothing calls this directly
no test coverage detected