14807: Wait at least 1 second between retries on initial queue poll.
[arvados.git] / lib / dispatchcloud / scheduler / scheduler.go
index 83fc08a9ffdb28c285965ca7a3f6cd41aba4dd7d..070b2de00669549dea9af3a7ef90626d64b1f484 100644 (file)
@@ -75,7 +75,10 @@ func (sch *Scheduler) run() {
        // Ensure the queue is fetched once before attempting anything.
        for err := sch.queue.Update(); err != nil; err = sch.queue.Update() {
                sch.logger.Errorf("error updating queue: %s", err)
-               d := sch.queueUpdateInterval / 60
+               d := sch.queueUpdateInterval / 10
+               if d < time.Second {
+                       d = time.Second
+               }
                sch.logger.Infof("waiting %s before retry", d)
                time.Sleep(d)
        }