diff --git a/config.json b/config.json index 7eee522..e9b36a1 100644 --- a/config.json +++ b/config.json @@ -42,8 +42,7 @@ "googleNews": "0 * * * *" }, "contentBackfill": { - "cron": "0 * * * *", - "batchSize": -1 + "concurrency": 10 }, "googleNews": { "queries": [ diff --git a/src/scheduler.js b/src/scheduler.js index 32c3c5c..8ad2eba 100644 --- a/src/scheduler.js +++ b/src/scheduler.js @@ -97,7 +97,8 @@ function startScheduler() { } try { - await backfillMissingContent(); + const concurrency = Number(config.contentBackfill?.concurrency) || 5; + await backfillMissingContent(-1, concurrency); } catch (error) { console.error('content backfill failed:', error); }