mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
fix: changing default numWorkers, making it customizable and refactoring scheduler (#1563)
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
7881ce32b2
commit
d4f200c2e1
@@ -201,7 +201,7 @@ func createObjectsStoreDynamo(rootDir string, cacheDir string, dedupe bool, tabl
|
||||
}
|
||||
|
||||
func runAndGetScheduler() (*scheduler.Scheduler, context.CancelFunc) {
|
||||
taskScheduler := scheduler.NewScheduler(log.Logger{})
|
||||
taskScheduler := scheduler.NewScheduler(config.New(), log.Logger{})
|
||||
taskScheduler.RateLimit = 50 * time.Millisecond
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
@@ -2006,7 +2006,7 @@ func TestRebuildDedupeIndex(t *testing.T) {
|
||||
|
||||
Convey("Intrerrupt rebuilding and restart, checking idempotency", func() {
|
||||
for i := 0; i < 10; i++ {
|
||||
taskScheduler := scheduler.NewScheduler(log.Logger{})
|
||||
taskScheduler := scheduler.NewScheduler(config.New(), log.Logger{})
|
||||
taskScheduler.RateLimit = 1 * time.Millisecond
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
||||
@@ -2045,7 +2045,7 @@ func TestRebuildDedupeIndex(t *testing.T) {
|
||||
|
||||
// now from dedupe false to true
|
||||
for i := 0; i < 10; i++ {
|
||||
taskScheduler := scheduler.NewScheduler(log.Logger{})
|
||||
taskScheduler := scheduler.NewScheduler(config.New(), log.Logger{})
|
||||
taskScheduler.RateLimit = 1 * time.Millisecond
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
||||
|
||||
Reference in New Issue
Block a user