parent
1f95377efa
commit
f649627d63
|
|
@ -131,6 +131,9 @@ def kill_container(container_name):
|
|||
try:
|
||||
container.stop()
|
||||
container.wait()
|
||||
container.remove()
|
||||
if container.status != "removed":
|
||||
container.remove()
|
||||
container.wait(condition="removed")
|
||||
|
||||
except docker.errors.NotFound as err:
|
||||
logger.debug(f"Cannot kill container {container.name}: {err}")
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ def get_postgres_container(ctx):
|
|||
f"Found container {container_name} in a exited status."
|
||||
" Removing it..."
|
||||
)
|
||||
container.remove()
|
||||
if container.status != "removed":
|
||||
container.remove()
|
||||
container.wait(condition="removed")
|
||||
else:
|
||||
return container
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user