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

Method Stop

queue_recovery.go:81–93  ·  view source on GitHub ↗

Stop shuts down the background recovery loop and waits for the worker goroutine to exit.

()

Source from the content-addressed store, hash-verified

79
80// Stop shuts down the background recovery loop and waits for the worker goroutine to exit.
81func (p *QueuedTransactionRecoveryProcessor) Stop() {
82 p.mu.Lock()
83 if !p.running {
84 p.mu.Unlock()
85 return
86 }
87 p.running = false
88 close(p.stopCh)
89 p.mu.Unlock()
90
91 p.wg.Wait()
92 logrus.Info("Queued transaction recovery processor stopped")
93}
94
95// IsRunning reports whether the recovery processor is currently active.
96func (p *QueuedTransactionRecoveryProcessor) IsRunning() bool {

Callers 2

workerCommandsFunction · 0.95
runMethod · 0.45

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
InfoMethod · 0.45

Tested by

no test coverage detected