drainer: reset index when new job registered

This commit is contained in:
Michael Schurter 2018-03-27 14:12:59 -07:00
parent 92a51471e9
commit fae77b874b

View file

@ -152,7 +152,10 @@ func (w *drainingJobWatcher) watch() {
w.logger.Printf("[TRACE] nomad.drain.job_watcher: shutting down") w.logger.Printf("[TRACE] nomad.drain.job_watcher: shutting down")
return return
default: default:
// The query context was cancelled // The query context was cancelled;
// reset index so we don't miss past
// updates to newly registered jobs
waitIndex = 1
continue continue
} }
} }