MCPcopy Index your code
hub / github.com/simstudioai/sim / getFlushDelayMs

Function getFlushDelayMs

apps/sim/lib/execution/event-buffer.ts:752–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750 let consecutiveFlushFailures = 0
751
752 const getFlushDelayMs = () => {
753 if (consecutiveFlushFailures === 0) return FLUSH_INTERVAL_MS
754 const backoff = Math.min(
755 FLUSH_INTERVAL_MS * 2 ** Math.min(consecutiveFlushFailures, 6),
756 FLUSH_MAX_RETRY_INTERVAL_MS
757 )
758 return backoff + randomInt(0, FLUSH_INTERVAL_MS)
759 }
760
761 const scheduleFlush = (delayMs = FLUSH_INTERVAL_MS) => {
762 if (flushTimer) return

Callers 1

flushPendingFunction · 0.85

Calls 1

randomIntFunction · 0.90

Tested by

no test coverage detected