Every pod was rescheduling its sweep on a fixed 60 s `Process.send_after` tick, so N replicas hit the shared NFS `/data/scores` mount and Postgres in lock-step every minute. Add a uniform jitter of up to 20 s on top of the 60 s base (effective range 60-80 s) so per-replica schedules drift apart. Expose `next_sweep_interval/0,2` as a public helper so the randomized window can be tested deterministically with `:rand` draws rather than mocking timers. Existing reschedule test passes `jitter_max_ms: 0` to keep its 2 s wait window honest. |
||
|---|---|---|
| .. | ||
| microwaveprop | ||
| microwaveprop_web | ||
| mix/tasks | ||
| microwaveprop.ex | ||
| microwaveprop_web.ex | ||