From 76eac7450abd6bc2c90f5c32590ccc7b208679a9 Mon Sep 17 00:00:00 2001 From: Null User Date: Tue, 26 Oct 2021 14:14:55 +0000 Subject: [PATCH] Refresh faster when the VRPs weren't downloaded on init --- cmd/stayrtr/stayrtr.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/stayrtr/stayrtr.go b/cmd/stayrtr/stayrtr.go index 1dc09ff..6effad4 100644 --- a/cmd/stayrtr/stayrtr.go +++ b/cmd/stayrtr/stayrtr.go @@ -379,6 +379,10 @@ func (s *state) routineUpdate(file string, interval int, slurmFile string) { signal.Notify(signals, syscall.SIGHUP) for { delay := time.NewTimer(time.Duration(interval) * time.Second) + if (s.lastchange.IsZero()) { + log.Warn("Initial sync not complete. Refreshing every 30 seconds") + delay = time.NewTimer(time.Duration(30) * time.Second) + } select { case <-delay.C: case <-signals: