1
Fork 0

Fix bug with max worker jobs

Fix bug where it was possible to set max scanner worker jobs to 0,
resulting in the scanner not processing any jobs.
This commit is contained in:
viktorstrate 2020-09-25 19:21:03 +02:00
parent 467ec54797
commit b133a1846c
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@ func (r *mutationResolver) SetPeriodicScanInterval(ctx context.Context, interval
}
func (r *mutationResolver) SetScannerConcurrentWorkers(ctx context.Context, workers int) (int, error) {
if workers < 0 {
return 0, errors.New("concurrent workers must be positive")
if workers < 1 {
return 0, errors.New("concurrent workers must at least be 1")
}
_, err := r.Database.Exec("UPDATE site_info SET concurrent_workers = ?", workers)