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

Method run

queue_recovery.go:103–119  ·  view source on GitHub ↗

run executes the poll loop that periodically scans for stuck queued transactions.

(ctx context.Context)

Source from the content-addressed store, hash-verified

101
102// run executes the poll loop that periodically scans for stuck queued transactions.
103func (p *QueuedTransactionRecoveryProcessor) run(ctx context.Context) {
104 ticker := time.NewTicker(p.pollInterval)
105 defer ticker.Stop()
106
107 for {
108 select {
109 case <-ctx.Done():
110 logrus.Info("Queued transaction recovery processor context cancelled")
111 return
112 case <-p.stopCh:
113 logrus.Info("Queued transaction recovery processor stop signal received")
114 return
115 case <-ticker.C:
116 p.processBatch(ctx)
117 }
118 }
119}
120
121// processBatch performs one periodic stuck-queue recovery pass using the configured threshold.
122func (p *QueuedTransactionRecoveryProcessor) processBatch(ctx context.Context) {

Callers 1

StartMethod · 0.95

Calls 3

processBatchMethod · 0.95
StopMethod · 0.45
InfoMethod · 0.45

Tested by

no test coverage detected