(syncIntervalMinutes: number)
| 188 | } |
| 189 | |
| 190 | function 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 | |
| 197 | async function completeSyncLog( |
| 198 | syncLogId: string, |
no test coverage detected