mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Elapsed time should account for the delay
This commit is contained in:
parent
27d90e9003
commit
d541e68027
1 changed files with 2 additions and 2 deletions
|
@ -92,11 +92,11 @@ def main():
|
||||||
port = int(params['port'])
|
port = int(params['port'])
|
||||||
state = params['state']
|
state = params['state']
|
||||||
|
|
||||||
|
start = datetime.datetime.now()
|
||||||
|
|
||||||
if delay:
|
if delay:
|
||||||
time.sleep(delay)
|
time.sleep(delay)
|
||||||
|
|
||||||
start = datetime.datetime.now()
|
|
||||||
|
|
||||||
if state == 'stopped':
|
if state == 'stopped':
|
||||||
### first wait for the host to go down
|
### first wait for the host to go down
|
||||||
end = start + datetime.timedelta(seconds=timeout)
|
end = start + datetime.timedelta(seconds=timeout)
|
||||||
|
|
Loading…
Reference in a new issue