Skip to content

Commit 7ccb8fb

Browse files
authored
Merge pull request #1376 from CVEProject/int
Fix Documentdb connection string
2 parents 216f545 + 4b343cd commit 7ccb8fb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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)