refactor(docker): simplified loop expression
ci/woodpecker/pr/docs Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/docker Pipeline was successful Details

pull/171/head
Jef Roosens 2022-05-09 15:05:53 +02:00
parent 5a5f7f8346
commit 3821ed29fd
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 1 additions and 5 deletions

View File

@ -118,11 +118,7 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db
mut data := docker.inspect_container(id) ?
// This loop waits until the container has stopped, so we can remove it after
for {
if !data.state.running {
break
}
for data.state.running {
time.sleep(1 * time.second)
data = docker.inspect_container(id) ?