From 0764b8f161a665b5ba487b1687983521f5ea1ecd Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Sat, 6 Feb 2016 16:09:39 -0800 Subject: [PATCH] Shorted eval id and only print waiting if time > 0 --- command/monitor.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/command/monitor.go b/command/monitor.go index af23737dac5..025f8e22ee0 100644 --- a/command/monitor.go +++ b/command/monitor.go @@ -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()