mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #16680 from PierreF/issues_16675
Fix #16675: add delay in EC2 API call retry.
This commit is contained in:
commit
d87d6f0670
1 changed files with 6 additions and 0 deletions
|
@ -1673,6 +1673,8 @@ def query_instance(vm_=None, call=None):
|
|||
)
|
||||
)
|
||||
attempts -= 1
|
||||
# Just a little delay between attempts...
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
if isinstance(data, list) and not data:
|
||||
|
@ -1681,6 +1683,8 @@ def query_instance(vm_=None, call=None):
|
|||
'remaining.'.format(attempts)
|
||||
)
|
||||
attempts -= 1
|
||||
# Just a little delay between attempts...
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
break
|
||||
|
@ -2328,6 +2332,8 @@ def set_tags(name=None,
|
|||
)
|
||||
)
|
||||
attempts -= 1
|
||||
# Just a little delay between attempts...
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
return settags
|
||||
|
|
Loading…
Add table
Reference in a new issue