MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / tickLoop

Method tickLoop

internal/webhookpub/worker.go:167–180  ·  view source on GitHub ↗

tickLoop runs on the calling goroutine. Wakes on notifyCh OR on the pollInterval timer (whichever first). Drains a batch each wake.

(ctx context.Context)

Source from the content-addressed store, hash-verified

165// tickLoop runs on the calling goroutine. Wakes on notifyCh OR on the
166// pollInterval timer (whichever first). Drains a batch each wake.
167func (w *OutboxWorker) tickLoop(ctx context.Context) {
168 ticker := time.NewTicker(w.pollInterval)
169 defer ticker.Stop()
170 for {
171 select {
172 case <-ctx.Done():
173 return
174 case <-w.notifyCh:
175 w.Tick(ctx)
176 case <-ticker.C:
177 w.Tick(ctx)
178 }
179 }
180}
181
182// Tick processes one batch of pending events. Exposed (not just the
183// private processBatch) so integration tests can drive the worker

Callers 1

StartMethod · 0.95

Calls 2

TickMethod · 0.95
StopMethod · 0.80

Tested by

no test coverage detected