Switch from setInterval to setTimeout
Switch from setInterval to setTimeout

Call the next digest using setTimeout at the end of the current digest to ensure that the next digest is only queued when the current one is complete. This is to prevent the possibility of multiple digest functions running at the same time.

Based on feedback from @timoxley

ketsugi/plexacious