feeds.fun
feeds.fun copied to clipboard
Implement "smart wait" logic for `InfiniteTasks`
Currently InfiniteTasks loop has constant sleep delay_between_runs seconds.
It is ok for now, but in the future, it could affect the speed of processing spikes of new news.
InfiniteTasks should support boolean return from single_run method. If single_run returns False, then InfiniteTasks should wait for delay_between_runs seconds before next iteration, otherwise it should start next iteration immediately.
Caused by gh-170