Skip to content

Commit 4b343cd

Browse files
authored
Merge pull request #1375 from CVEProject/dev
fixing docdb connection string
2 parents 5e98d5e + e779d56 commit 4b343cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/db.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ function getMongoConnectionString () {
2626
logger.info('Using dbName = ' + config.get(`${appEnv}.database`))
2727
logger.info(`Will try to connect to database ${dbName} at ${dbHost}:${dbPort}`)
2828

29-
return `mongodb://${dbLoginPrepend}${dbHost}:${dbPort}/${dbName}`
29+
if (process.env.useAWS) {
30+
return `mongodb://${dbLoginPrepend}${dbHost}:${dbPort}/${dbName}?retryWrites=false`
31+
} else {
32+
return `mongodb://${dbLoginPrepend}${dbHost}:${dbPort}/${dbName}`
33+
}
3034
}
3135

3236
function getMongoConnectionOptions () {

0 commit comments

Comments
 (0)