From 26d9db6624dedd7e6f37bd7d799855fb8c30b7ae Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Wed, 4 Dec 2024 12:43:30 +0100 Subject: [PATCH] fix linter --- lib/model/dbConn.js | 3 ++- lib/services/protocolData.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/model/dbConn.js b/lib/model/dbConn.js index 8fe016e..925e39c 100644 --- a/lib/model/dbConn.js +++ b/lib/model/dbConn.js @@ -68,7 +68,7 @@ async function init(logger, host, db, port, username, password, options) { const maxRetries = config.getConfig().mongodb?.retries || constants.DEFAULT_MONGODB_RETRIES; const retryTime = config.getConfig().mongodb?.retryTime || constants.DEFAULT_MONGODB_RETRY_TIME; - + /* eslint-disable no-await-in-loop */ for (let attempt = 1; attempt <= maxRetries; attempt++) { try { logger.info(`Attempt ${attempt}: Connecting to MongoDB at ${url}`); @@ -96,6 +96,7 @@ async function init(logger, host, db, port, username, password, options) { } } } + /* eslint-enable no-await-in-loop */ } async function configureDb(logger) { diff --git a/lib/services/protocolData.js b/lib/services/protocolData.js index 05b7609..d30b518 100644 --- a/lib/services/protocolData.js +++ b/lib/services/protocolData.js @@ -61,10 +61,11 @@ function cleanConfigurations(logger, protocol, iotagent, resource, callback) { .exec({}) .then((commandResult) => { logger.debug( - 'Configurations for Protocol [%s][%s][%s] successfully removed.', + 'Configurations for Protocol [%s][%s][%s] successfully removed %s', protocol, iotagent, - resource + resource, + commandResult ); callback(null); }) @@ -144,6 +145,7 @@ function save(logger, newProtocol, callback) { ) ); } + /* eslint-disable no-inner-declarations */ function func1(callback) { protocolObj .save({}) @@ -154,6 +156,7 @@ function save(logger, newProtocol, callback) { callback(error); }); } + /* eslint-enable no-inner-declarations */ actions.push(func1); async.series(actions, callback); }