Skip to content

Commit

Permalink
return value all use observed
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzw2022 committed Jan 13, 2017
1 parent 030a95b commit e249de9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/build/registry/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ func WaitForRunningBuild(watcher rest.Watcher, ctx kapi.Context, build *api.Buil
observed = obj

if event.Type == watch.Deleted {
return obj, false, ErrBuildDeleted
return observed, false, ErrBuildDeleted
}
switch obj.Status.Phase {
case api.BuildPhaseRunning, api.BuildPhaseComplete, api.BuildPhaseFailed, api.BuildPhaseError, api.BuildPhaseCancelled:
return obj, true, nil
return observed, true, nil
case api.BuildPhaseNew, api.BuildPhasePending:
default:
return obj, false, ErrUnknownBuildPhase
return observed, false, ErrUnknownBuildPhase
}
case <-expire:
return observed, false, nil
Expand Down

0 comments on commit e249de9

Please sign in to comment.