Shorted eval id and only print waiting if time > 0

This commit is contained in:
Alex Dadgar 2016-02-06 16:09:39 -08:00
parent b5acfc77d9
commit d2d59905a2
1 changed files with 7 additions and 5 deletions

View File

@ -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 != "" {
if eval.Wait.Nanoseconds() != 0 {
m.ui.Info(fmt.Sprintf(
"Monitoring next evaluation %q in %s",
eval.NextEval, eval.Wait))
limit(eval.NextEval, m.length), eval.Wait))
// Skip some unnecessary polling
time.Sleep(eval.Wait)
}
// Reset the state and monitor the new eval
m.state = newEvalState()