mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
allow scanner key cycle to be empty (#18001)
configs from 2020 server throws an error due to deprecation of the keys however an attempt is made to parse them, we should have chosen existing defaults - this PR fixes that.
This commit is contained in:
@@ -127,7 +127,11 @@ func lookupDeprecatedScannerConfig(kvs config.KVS) (cfg Config, err error) {
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
cfg.Cycle, err = time.ParseDuration(env.Get(EnvCycle, kvs.GetWithDefault(Cycle, DefaultKVS)))
|
||||
cycle := env.Get(EnvCycle, kvs.GetWithDefault(Cycle, DefaultKVS))
|
||||
if cycle == "" {
|
||||
cycle = "1m"
|
||||
}
|
||||
cfg.Cycle, err = time.ParseDuration(cycle)
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user