mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 11:36:45 +00:00
fix mongoose options
This commit is contained in:
parent
d463e2373e
commit
6d0917964b
2 changed files with 5 additions and 5 deletions
|
|
@ -24,8 +24,8 @@ let improveRepl = (context) => {
|
|||
|
||||
const isProd = nconf.get('NODE_ENV') === 'production';
|
||||
const mongooseOptions = !isProd ? {} : {
|
||||
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
|
||||
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
|
||||
keepAlive: 1,
|
||||
connectTimeoutMS: 30000,
|
||||
};
|
||||
mongoose.connect(
|
||||
nconf.get('NODE_DB_URI'),
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ mongoose.Promise = Bluebird;
|
|||
|
||||
// Do not connect to MongoDB when in maintenance mode
|
||||
if (MAINTENANCE_MODE !== 'true') {
|
||||
let mongooseOptions = !IS_PROD ? {} : {
|
||||
replset: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
|
||||
server: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
|
||||
const mongooseOptions = !IS_PROD ? {} : {
|
||||
keepAlive: 120,
|
||||
connectTimeoutMS: 30000,
|
||||
};
|
||||
|
||||
const NODE_DB_URI = nconf.get('IS_TEST') ? nconf.get('TEST_DB_URI') : nconf.get('NODE_DB_URI');
|
||||
|
|
|
|||
Loading…
Reference in a new issue