1
0
Fork 0
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:
andres-portainer 2024-12-17 16:25:49 -03:00 committed by GitHub
parent 35dcb5ca46
commit 13317ec43c
4 changed files with 52 additions and 61 deletions

View file

@ -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
}