MCPcopy Create free account
hub / github.com/coder/coder / getPendingWorkLocked

Method getPendingWorkLocked

codersdk/agentsdk/logs.go:473–485  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

471}
472
473func (l *LogSender) getPendingWorkLocked() (src uuid.UUID, q *logQueue) {
474 // take the one it's been the longest since we've flushed, so that we have some sense of
475 // fairness across sources
476 var earliestFlush time.Time
477 for is, iq := range l.queues {
478 if q == nil || iq.lastFlush.Before(earliestFlush) {
479 src = is
480 q = iq
481 earliestFlush = iq.lastFlush
482 }
483 }
484 return src, q
485}
486
487func (l *LogSender) GetScriptLogger(logSourceID uuid.UUID) ScriptLogger {
488 return ScriptLogger{srcID: logSourceID, sender: l}

Callers 1

SendLoopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected