Allow `0` value to disable ScanSchedule.
Seems that Viper does not recognize empty environment vars as valid values Closes #1274
This commit is contained in:
parent
e9d0abe0bc
commit
b44ef81c6f
|
@ -154,7 +154,7 @@ func validateScanSchedule() error {
|
|||
log.Warn("Setting ScanSchedule", "schedule", Server.ScanSchedule)
|
||||
}
|
||||
}
|
||||
if Server.ScanSchedule == "" {
|
||||
if Server.ScanSchedule == "0" || Server.ScanSchedule == "" {
|
||||
return nil
|
||||
}
|
||||
if _, err := time.ParseDuration(Server.ScanSchedule); err == nil {
|
||||
|
|
Loading…
Reference in New Issue