- When many tasks are scheduled at once, they will try to write to the database
at the same time. This happens prominently in develop mode when multiple
notifications are attempted to be shown.
- Also other resource contention may happen.
- Avoid this by adding or subtracting 5% to the provided task scheduling
interval time.
Tests:
- Print the interval times in the schedule() method and verify that the final
interval values are randomized and vary by only 5% from the provided interval.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>