From 0f37ea51027a3091ea67823d554d2d10e1c4ccf5 Mon Sep 17 00:00:00 2001 From: Steve Larson <9larsons@gmail.com> Date: Tue, 10 Sep 2024 09:58:26 -0500 Subject: [PATCH] Updated logging --- .../lib/JobManagerBackground.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ghost/job-manager-background/lib/JobManagerBackground.js b/ghost/job-manager-background/lib/JobManagerBackground.js index 52088a0e66..75829c7522 100644 --- a/ghost/job-manager-background/lib/JobManagerBackground.js +++ b/ghost/job-manager-background/lib/JobManagerBackground.js @@ -32,14 +32,8 @@ class JobManagerBackground { * @returns {Promise} */ async init() { - console.log(`[JobManager] Initializing`); - - this.reportStats(); - - if (this.#testMode) { - // this.testDataContinuousFill(); - this.startQueueFiller(); - } + console.log(`[JobManager] Initializing job queue`); + this.startQueueFiller(); } /** @@ -87,12 +81,12 @@ class JobManagerBackground { } isPolling = true; - console.log(`[JobManager] Polling for jobs, current interval: ${Math.floor(currentPollInterval / 1000)}s`); + console.log(`[JobManager] Polling for jobs; current interval: ${Math.floor(currentPollInterval / 1000)}s`); try { const stats = await this.getStats(); if (stats.pendingTasks <= 500) { const entriesToAdd = Math.min(500, 501 - stats.pendingTasks); - console.log(`[JobManager] Adding ${entriesToAdd} queue entries. Current pending tasks: ${stats.pendingTasks}`); + console.log(`[JobManager] Adding up to ${entriesToAdd} queue entries. Current pending tasks: ${stats.pendingTasks}. Current worker count: ${stats.totalWorkers}`); const jobs = await this.jobsRepository.getQueuedJobs(entriesToAdd); if (jobs.length > 0) {