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

Method run

lineage_worker.go:145–161  ·  view source on GitHub ↗

run is the main processing loop.

(ctx context.Context)

Source from the content-addressed store, hash-verified

143
144// run is the main processing loop.
145func (p *LineageOutboxProcessor) run(ctx context.Context) {
146 ticker := time.NewTicker(p.pollInterval)
147 defer ticker.Stop()
148
149 for {
150 select {
151 case <-ctx.Done():
152 logrus.Info("Lineage outbox processor context cancelled")
153 return
154 case <-p.stopCh:
155 logrus.Info("Lineage outbox processor stop signal received")
156 return
157 case <-ticker.C:
158 p.processBatch(ctx)
159 }
160 }
161}
162
163// processBatch claims and processes a batch of pending outbox entries.
164func (p *LineageOutboxProcessor) 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