[tasks] fix regular task loops

This commit is contained in:
Sebastian Law
2021-05-10 17:25:16 -07:00
committed by GitHub
parent 757cfad38f
commit f5727ff0d0

View File

@ -151,8 +151,9 @@ class Loop:
now = datetime.datetime.now(datetime.timezone.utc)
if now > self._next_iteration:
self._prepare_time_index(now)
self._next_iteration = now
if self._time is not None:
self._prepare_time_index(now)
self._current_loop += 1
if self._current_loop == self.count: