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

Function calculateNextSyncTime

apps/sim/lib/knowledge/connectors/sync-engine.ts:190–195  ·  view source on GitHub ↗
(syncIntervalMinutes: number)

Source from the content-addressed store, hash-verified

188}
189
190function calculateNextSyncTime(syncIntervalMinutes: number): Date | null {
191 if (syncIntervalMinutes <= 0) return null
192 const now = Date.now()
193 const jitterMs = randomInt(0, Math.min(syncIntervalMinutes * 6_000, 300_000))
194 return new Date(now + syncIntervalMinutes * 60_000 + jitterMs)
195}
196
197async function completeSyncLog(
198 syncLogId: string,

Callers 1

executeSyncFunction · 0.85

Calls 1

randomIntFunction · 0.90

Tested by

no test coverage detected