mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
fix: remove inline GC and schedule a background task instead (#1610)
* fix: remove inline GC and set a default value of gc interval - remove inline GC - add a default value of GC interval - run the GC periodically by default with the default value if no interval provided - generate GC tasks with a random delay(0-30s) between - add IsReady() method to scheduler.TaskGenerator interface Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com> * ci: add test for gc with short interval Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com> --------- Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
This commit is contained in:
@@ -46,6 +46,7 @@ func TestScrubExtension(t *testing.T) {
|
||||
|
||||
conf.Storage.RootDirectory = dir
|
||||
conf.Storage.Dedupe = false
|
||||
conf.Storage.GC = false
|
||||
|
||||
substore := config.StorageConfig{RootDirectory: subdir}
|
||||
conf.Storage.SubPaths = map[string]config.StorageConfig{"/a": substore}
|
||||
@@ -89,6 +90,7 @@ func TestScrubExtension(t *testing.T) {
|
||||
|
||||
conf.Storage.RootDirectory = dir
|
||||
conf.Storage.Dedupe = false
|
||||
conf.Storage.GC = false
|
||||
|
||||
conf.Log.Output = logFile.Name()
|
||||
trueValue := true
|
||||
@@ -137,6 +139,7 @@ func TestScrubExtension(t *testing.T) {
|
||||
|
||||
conf.Storage.RootDirectory = dir
|
||||
conf.Storage.Dedupe = false
|
||||
conf.Storage.GC = false
|
||||
|
||||
conf.Log.Output = logFile.Name()
|
||||
trueValue := true
|
||||
|
||||
Reference in New Issue
Block a user