mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
VMware: Fix wait_for_task backoff behavior (#45429)
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
01398f61d5
commit
796d8b5dc8
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def wait_for_task(task, max_backoff=64, timeout=3600):
|
|||
finally:
|
||||
raise_from(TaskError(error_msg), task.info.error)
|
||||
if task.info.state in [vim.TaskInfo.State.running, vim.TaskInfo.State.queued]:
|
||||
sleep_time = min(2 ** failure_counter + randint(1, 1000), max_backoff)
|
||||
sleep_time = min(2 ** failure_counter + randint(1, 1000) / 1000, max_backoff)
|
||||
time.sleep(sleep_time)
|
||||
failure_counter += 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue