Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Dec 4, 2024
1 parent d021e6b commit 26d9db6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/model/dbConn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down Expand Up @@ -96,6 +96,7 @@ async function init(logger, host, db, port, username, password, options) {
}
}
}
/* eslint-enable no-await-in-loop */
}

async function configureDb(logger) {
Expand Down
7 changes: 5 additions & 2 deletions lib/services/protocolData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand Down Expand Up @@ -144,6 +145,7 @@ function save(logger, newProtocol, callback) {
)
);
}
/* eslint-disable no-inner-declarations */
function func1(callback) {
protocolObj
.save({})
Expand All @@ -154,6 +156,7 @@ function save(logger, newProtocol, callback) {
callback(error);
});
}
/* eslint-enable no-inner-declarations */
actions.push(func1);
async.series(actions, callback);
}
Expand Down

0 comments on commit 26d9db6

Please sign in to comment.