1
0
Fork 0

Auto-reconnect to mongo database

I wish I knew this option existed ~7yr ago.  This should have been
done long ago, but we've had so few problems with it, that it had
never been explored.

This [version of this] mongo library is ancient and needs to be
upgraded.  Until then, this'll do.

* src/server/daemon/controller.js (init): Set `auto_reconnect'.
master
Mike Gerwitz 2017-08-22 16:46:47 -04:00
parent ce11fe9428
commit 6a777c3c51
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ exports.init = function( logger, enc_service )
new MongoServer(
process.env.MONGODB_HOST || '127.0.0.1',
+process.env.MONGODB_PORT || MongoConnection.DEFAULT_PORT,
{}
{ auto_reconnect: true }
),
{ native_parser: false, safe: false }
);