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

Method Start

queue_recovery.go:61–78  ·  view source on GitHub ↗

Start begins the background recovery loop for stuck queued transactions.

(ctx context.Context)

Source from the content-addressed store, hash-verified

59
60// Start begins the background recovery loop for stuck queued transactions.
61func (p *QueuedTransactionRecoveryProcessor) Start(ctx context.Context) {
62 p.mu.Lock()
63 if p.running {
64 p.mu.Unlock()
65 return
66 }
67 p.running = true
68 p.stopCh = make(chan struct{})
69 p.mu.Unlock()
70
71 p.wg.Add(1)
72 go func() {
73 defer p.wg.Done()
74 p.run(ctx)
75 }()
76
77 logrus.Info("Queued transaction recovery processor started")
78}
79
80// Stop shuts down the background recovery loop and waits for the worker goroutine to exit.
81func (p *QueuedTransactionRecoveryProcessor) Stop() {

Callers 1

workerCommandsFunction · 0.95

Calls 4

runMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45
InfoMethod · 0.45

Tested by

no test coverage detected