Skip to content

Commit

Permalink
Merge pull request #776 from hashicorp/f-eval-monitor-output
Browse files Browse the repository at this point in the history
Cleanup eval-monitor output
  • Loading branch information
dadgar committed Feb 7, 2016
2 parents 2313db3 + 0764b8f commit 4c09834
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions command/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,14 @@ func (m *monitor) monitor(evalID string, allowPrefix bool) int {

// Monitor the next eval in the chain, if present
if eval.NextEval != "" {
m.ui.Info(fmt.Sprintf(
"Monitoring next evaluation %q in %s",
eval.NextEval, eval.Wait))
if eval.Wait.Nanoseconds() != 0 {
m.ui.Info(fmt.Sprintf(
"Monitoring next evaluation %q in %s",
limit(eval.NextEval, m.length), eval.Wait))

// Skip some unnecessary polling
time.Sleep(eval.Wait)
// Skip some unnecessary polling
time.Sleep(eval.Wait)
}

// Reset the state and monitor the new eval
m.state = newEvalState()
Expand Down

0 comments on commit 4c09834

Please sign in to comment.