From f3f892f448d77ddafc7e298ac5352659b65551b0 Mon Sep 17 00:00:00 2001 From: Shizun Ge Date: Wed, 29 Nov 2023 21:48:14 -0800 Subject: [PATCH] log nb_jobs only when number of jobs is larger than 0 in scheduler. --- internal/cli/scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/scheduler.go b/internal/cli/scheduler.go index 9f69d7ea..de838e16 100644 --- a/internal/cli/scheduler.go +++ b/internal/cli/scheduler.go @@ -40,7 +40,7 @@ func feedScheduler(store *storage.Storage, pool *worker.Pool, frequency, batchSi if jobs, err := batchBuilder.FetchJobs(); err != nil { slog.Error("Unable to fetch jobs from database", slog.Any("error", err)) - } else { + } else if len(jobs) > 0 { slog.Info("Created a batch of feeds", slog.Int("nb_jobs", len(jobs)), )