Merge pull request #5069 from AkihiroSuda/restart-fast

restart: skip Sleep() for the first iteration of the reconcilation
This commit is contained in:
Derek McGowan 2021-02-25 16:37:53 -08:00 committed by GitHub
commit 9884730e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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