From b70e2576fade3f20479df7942aeba1a0148f6ebd Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Wed, 15 May 2024 16:07:01 +0200 Subject: [PATCH] fixups post reviews --- CountItems/masterProcess.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CountItems/masterProcess.js b/CountItems/masterProcess.js index f3d232fd..2b7079f8 100644 --- a/CountItems/masterProcess.js +++ b/CountItems/masterProcess.js @@ -22,11 +22,11 @@ const loggerConfig = { werelogs.configure(loggerConfig); const log = new werelogs.Logger('S3Utils::CountItems::Master'); -const frequency = process.env.PROMETHEUS_POLLING_FREQUENCY && !Number.isNaN(process.env.PROMETHEUS_POLLING_FREQUENCY) +const prometheusPollingFrequency = process.env.PROMETHEUS_POLLING_FREQUENCY && !Number.isNaN(process.env.PROMETHEUS_POLLING_FREQUENCY) ? Number.parseInt(process.env.PROMETHEUS_POLLING_FREQUENCY, 10) : 30; -const threshold = process.env.PROMETHEUS_POLLING_THRESHOLD && !Number.isNaN(process.env.PROMETHEUS_POLLING_THRESHOLD) +const promtheusPollingThreshold = process.env.PROMETHEUS_POLLING_THRESHOLD && !Number.isNaN(process.env.PROMETHEUS_POLLING_THRESHOLD) ? Number.parseInt(process.env.PROMETHEUS_POLLING_THRESHOLD, 10) : 5; @@ -78,5 +78,5 @@ countMaster.start(err => { } setTimeout(() => { countMaster.stop(null, () => process.exit(0)); - }, threshold * frequency * 1000 * 4); + }, promtheusPollingThreshold * prometheusPollingFrequency * 1000 * 4); });