Update the check interval for new geo db and change log level (#1908)

Update log level to trace and update the check db interval from 60s to 300s
This commit is contained in:
Maycon Santos 2024-04-30 17:54:29 +02:00 committed by GitHub
parent e435e39158
commit 3598418206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ func NewGeolocation(dataDir string) (*Geolocation, error) {
sha256sum: sha256sum,
db: db,
locationDB: locationDB,
reloadCheckInterval: 60 * time.Second, // TODO: make configurable
reloadCheckInterval: 300 * time.Second, // TODO: make configurable
stopCh: make(chan struct{}),
}
@ -198,7 +198,7 @@ func (gl *Geolocation) reloader() {
log.Errorf("mmdb reload failed: %s", err)
}
} else {
log.Debugf("No changes in '%s', no need to reload. Next check is in %.0f seconds.",
log.Tracef("No changes in '%s', no need to reload. Next check is in %.0f seconds.",
gl.mmdbPath, gl.reloadCheckInterval.Seconds())
}
}

View File

@ -150,7 +150,7 @@ func (s *SqliteStore) reload() error {
log.Infof("Successfully reloaded '%s'", s.filePath)
} else {
log.Debugf("No changes in '%s', no need to reload", s.filePath)
log.Tracef("No changes in '%s', no need to reload", s.filePath)
}
return nil