Update config.go

This commit is contained in:
NikitaR13 2025-01-23 15:38:10 +03:00 committed by GitHub
parent 2d92ce8490
commit c3eb8df10b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ func LoadConfig(path string) (*Config, error) {
return nil, err
}
// Переопределения через ENV (пример)
if e := os.Getenv("INDEXER_POLL_INTERVAL"); e != "" {
if val, err := strconv.Atoi(e); err == nil {
c.PollIntervalSeconds = val