Skip to content

Commit

Permalink
fix blocking queries in deployment watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jul 18, 2017
1 parent 970fac0 commit e3a6b5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nomad/deploymentwatcher/deployment_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func (w *deploymentWatcher) StopWatch() {

// watch is the long running watcher that takes actions upon allocation changes
func (w *deploymentWatcher) watch() {
allocIndex := uint64(0)
allocIndex := uint64(1)
for {
// Block getting all allocations that are part of the deployment using
// the last evaluation index. This will have us block waiting for
Expand Down
2 changes: 1 addition & 1 deletion nomad/deploymentwatcher/deployments_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (w *Watcher) flush() {
// watchDeployments is the long lived go-routine that watches for deployments to
// add and remove watchers on.
func (w *Watcher) watchDeployments() {
dindex := uint64(0)
dindex := uint64(1)
for {
// Block getting all deployments using the last deployment index.
resp, err := w.getDeploys(dindex)
Expand Down

0 comments on commit e3a6b5b

Please sign in to comment.