* taskId is an 8-hex-char UUID slice (see addCronTask) → parse as * u32 → [0, 1). Stable across restarts, uniformly distributed across the * fleet. Non-hex ids (hand-edited JSON) fall back to 0 = no jitter.
(taskId: string)
| 360 | * fleet. Non-hex ids (hand-edited JSON) fall back to 0 = no jitter. |
| 361 | */ |
| 362 | function jitterFrac(taskId: string): number { |
| 363 | const frac = parseInt(taskId.slice(0, 8), 16) / 0x1_0000_0000 |
| 364 | return Number.isFinite(frac) ? frac : 0 |
| 365 | } |
| 366 | |
| 367 | /** |
| 368 | * Same as {@link nextCronRunMs}, plus a deterministic per-task delay to |
no outgoing calls
no test coverage detected