mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
Disable sync periodically polling when pollInterval is not configured
Filtering out sync on demand images based on content configuration Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
c61c3836db
commit
c86f44cc53
@@ -48,8 +48,15 @@ func (h *PostHandler) Handler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
for _, regCfg := range h.Cfg.Registries {
|
||||
// if content not provided, don't run periodically sync
|
||||
if len(regCfg.Content) == 0 {
|
||||
h.Log.Info().Msgf("no content found for %s, will not run periodically sync", regCfg.URL)
|
||||
h.Log.Info().Msgf("sync config content not configured for %s, will not run periodically sync", regCfg.URL)
|
||||
continue
|
||||
}
|
||||
|
||||
// if pollInterval is not provided, don't run periodically sync
|
||||
if regCfg.PollInterval == 0 {
|
||||
h.Log.Warn().Msgf("sync config PollInterval not configured for %s, will not run periodically sync", regCfg.URL)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user