mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -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:
parent
ca6dd8be5e
commit
e3fbcaeb72
@ -127,7 +127,11 @@ func lookupDeprecatedScannerConfig(kvs config.KVS) (cfg Config, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return cfg, err
|
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 {
|
if err != nil {
|
||||||
return cfg, err
|
return cfg, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user