CI GetContainerHealth(): speed up checks
This commit is contained in:
committed by
Robert Schmidt
parent
d0b637a020
commit
5f1219bc32
@@ -159,12 +159,11 @@ def GetContainerHealth(ssh, containerName):
|
|||||||
return False
|
return False
|
||||||
if 'db_init' in containerName or 'db-init' in containerName: # exits with 0, there cannot be healthy
|
if 'db_init' in containerName or 'db-init' in containerName: # exits with 0, there cannot be healthy
|
||||||
return True
|
return True
|
||||||
time.sleep(5)
|
for _ in range(8):
|
||||||
for _ in range(3):
|
|
||||||
result = ssh.run(f'docker inspect --format="{{{{.State.Health.Status}}}}" {containerName}', silent=True)
|
result = ssh.run(f'docker inspect --format="{{{{.State.Health.Status}}}}" {containerName}', silent=True)
|
||||||
if result.stdout == 'healthy':
|
if result.stdout == 'healthy':
|
||||||
return True
|
return True
|
||||||
time.sleep(10)
|
time.sleep(5)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
|
def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
|
||||||
|
|||||||
Reference in New Issue
Block a user