Fix logic error in periodic task wait code.
I was calculating the time to wait for the next run of a periodic task incorrectly. Resolves bug 1098819. Change-Id: Ida60b69014aa06229111e58024e35268262f18fb
This commit is contained in:
@@ -215,8 +215,9 @@ class Manager(base.Base):
|
||||
if self._periodic_spacing[task_name] is None:
|
||||
wait = 0
|
||||
else:
|
||||
wait = time.time() - (self._periodic_last_run[task_name] +
|
||||
self._periodic_spacing[task_name])
|
||||
due = (self._periodic_last_run[task_name] +
|
||||
self._periodic_spacing[task_name])
|
||||
wait = max(0, due - time.time())
|
||||
if wait > 0.2:
|
||||
if wait < idle_for:
|
||||
idle_for = wait
|
||||
|
Reference in New Issue
Block a user