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
1 changed files with 4 additions and 1 deletions

View File

@ -152,7 +152,10 @@ func (w *drainingJobWatcher) watch() {
w.logger.Printf("[TRACE] nomad.drain.job_watcher: shutting down")
return
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
}
}