restart: skip Sleep() for the first iteration of the reconcilation

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2021-02-24 16:55:52 +09:00
parent af4c55fa4a
commit 6ab6eaa790
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A

View File

@ -152,10 +152,10 @@ func (m *monitor) run(interval time.Duration) {
interval = 10 * time.Second
}
for {
time.Sleep(interval)
if err := m.reconcile(context.Background()); err != nil {
logrus.WithError(err).Error("reconcile")
}
time.Sleep(interval)
}
}