mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 13:59:40 +02:00
feat(stacks): simplify WaitForStatus() BE-11505 (#241)
This commit is contained in:
parent
35dcb5ca46
commit
13317ec43c
4 changed files with 52 additions and 61 deletions
|
@ -106,8 +106,7 @@ func waitForStatus(deployer libstack.Deployer, ctx context.Context, stackName st
|
|||
ctx, cancel := context.WithTimeout(ctx, 1*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
statusCh := deployer.WaitForStatus(ctx, stackName, requiredStatus)
|
||||
result := <-statusCh
|
||||
result := deployer.WaitForStatus(ctx, stackName, requiredStatus)
|
||||
if result.ErrorMsg == "" {
|
||||
return result.Status, "", nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue