mirror of
https://github.com/kemko/nomad.git
synced 2026-01-13 05:45:41 +03:00
Random wait
This commit is contained in:
@@ -1305,8 +1305,9 @@ func (c *Client) watchAllocations(updates chan *allocUpdates) {
|
||||
if _, ok := pulledAllocs[desiredID]; !ok {
|
||||
// We didn't get everything we wanted. Do not update the
|
||||
// MinQueryIndex, sleep and then retry.
|
||||
wait := c.retryIntv(2 * time.Second)
|
||||
select {
|
||||
case <-time.After(2 * time.Second):
|
||||
case <-time.After(wait):
|
||||
// Wait for the server we contact to receive the
|
||||
// allocations
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user