From d8670fdc973cebbc932790c20109a193a16d2021 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Thu, 7 Jul 2022 12:54:09 -0400 Subject: [PATCH] fix(db): mongo flag for version upgrade --- src/backup/backup.js | 2 +- src/backup/restore.js | 2 +- src/database/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backup/backup.js b/src/backup/backup.js index 8cf7cd7e4..a60a0e924 100644 --- a/src/backup/backup.js +++ b/src/backup/backup.js @@ -126,7 +126,7 @@ function runBackup (callback) { if (!CONNECTION_URI) return process.send({ error: { message: 'Invalid connection uri' } }) const options = { - keepAlive: 0, + keepAlive: false, connectTimeoutMS: 5000 } database.init( diff --git a/src/backup/restore.js b/src/backup/restore.js index a78839aa5..e7294ec96 100644 --- a/src/backup/restore.js +++ b/src/backup/restore.js @@ -134,7 +134,7 @@ function runRestore (file, callback) { } const options = { - keepAlive: 0, + keepAlive: true, connectTimeoutMS: 5000 } database.init( diff --git a/src/database/index.js b/src/database/index.js index 57fbdfd5d..12980a575 100644 --- a/src/database/index.js +++ b/src/database/index.js @@ -61,7 +61,7 @@ if (!mongoConnectionUri.username) { if (process.env.TD_MONGODB_URI) CONNECTION_URI = process.env.TD_MONGODB_URI let options = { - keepAlive: 1, + keepAlive: true, connectTimeoutMS: 30000 }