mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
make gc periodic
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
89c5f4f604
commit
5e35dfa28f
+17
-3
@@ -209,9 +209,23 @@ func validateConfiguration(config *config.Config) error {
|
||||
return errors.ErrBadConfig
|
||||
}
|
||||
|
||||
if !config.Storage.GC && config.Storage.GCDelay != 0 {
|
||||
log.Warn().Err(errors.ErrBadConfig).
|
||||
Msg("garbage-collect delay specified without enabling garbage-collect, will be ignored")
|
||||
if config.Storage.GCInterval < 0 {
|
||||
log.Error().Err(errors.ErrBadConfig).
|
||||
Msgf("invalid garbage-collect interval %v specified", config.Storage.GCInterval)
|
||||
|
||||
return errors.ErrBadConfig
|
||||
}
|
||||
|
||||
if !config.Storage.GC {
|
||||
if config.Storage.GCDelay != 0 {
|
||||
log.Warn().Err(errors.ErrBadConfig).
|
||||
Msg("garbage-collect delay specified without enabling garbage-collect, will be ignored")
|
||||
}
|
||||
|
||||
if config.Storage.GCInterval != 0 {
|
||||
log.Warn().Err(errors.ErrBadConfig).
|
||||
Msg("periodic garbage-collect interval specified without enabling garbage-collect, will be ignored")
|
||||
}
|
||||
}
|
||||
|
||||
// check authorization config, it should have basic auth enabled or ldap
|
||||
|
||||
Reference in New Issue
Block a user