Skip to content

Commit

Permalink
Merge pull request #43 from tripiq/eval-loop
Browse files Browse the repository at this point in the history
levant: fix infinite loop with sleep
  • Loading branch information
jrasell committed Nov 23, 2017
2 parents 7bea5b1 + 1e87d03 commit 2690f0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions levant/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ func (c *nomadClient) Deploy(job *nomad.Job, autoPromote int, forceCount bool) (

func (c *nomadClient) evaluationInspector(evalID *string) error {

evalInfo, _, err := c.nomad.Evaluations().Info(*evalID, nil)
if err != nil {
return err
}

for {
evalInfo, _, err := c.nomad.Evaluations().Info(*evalID, nil)
if err != nil {
return err
}

switch evalInfo.Status {
case nomadStructs.EvalStatusComplete, nomadStructs.EvalStatusFailed, nomadStructs.EvalStatusCancelled:
if len(evalInfo.FailedTGAllocs) == 0 {
Expand Down

0 comments on commit 2690f0c

Please sign in to comment.