Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 520854 - Fix deprecated calls to mongoose
  • Loading branch information
squarti committed Aug 11, 2017
1 parent c8e9c92 commit 86075ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/orionode/lib/metastore/mongodb/store.js
Expand Up @@ -133,6 +133,7 @@ function MongoDbMetastore(options) {
var credentials = mongodb_services[0].credentials;
var ca = [new Buffer(credentials.ca_certificate_base64, 'base64')];
mongoose.connect(credentials.uri, {
useMongoClient: true,
mongos: {
ssl: true,
sslValidate: true,
Expand All @@ -143,7 +144,9 @@ function MongoDbMetastore(options) {
});
}
} else {
mongoose.connect(options.configParams["orion.mongodb.url"]);
mongoose.connect(options.configParams["orion.mongodb.url"], {
useMongoClient: true
});
}
api.getOrionEE().on("close-server", function() {
logger.info("Closing MongoDB");
Expand Down

0 comments on commit 86075ad

Please sign in to comment.