lib/shared-mongo-connections.js
function getMongooseConnection(mongoDbUrl, logger, cb) {
  logger.debug("creating mongoose connection for data_source_update job", {mongoDbUrl: mongoDbUrl});
  var mongooseConnection = mongoose.createConnection(mongoDbUrl);
  return cb(undefined, mongooseConnection);
}
function getMongooseConnection(mongoDbUrl, logger, cb) {
  logger.debug("creating mongoose connection for data_source_update job", {mongoDbUrl: mongoDbUrl});
  var mongooseConnection = mongoose.createConnection(mongoDbUrl);
  return cb(undefined, mongooseConnection);
}
function getMongooseConnection ( mongoDbUrl , logger , cb ) { logger . debug ( "creating mongoose connection for data_source_update job" , { mongoDbUrl : mongoDbUrl } ) ; var mongooseConnection = mongoose . createConnection ( mongoDbUrl ) ; return cb ( undefined , mongooseConnection ) ; }
Create a new mongoose connection.
@param {string} mongoDbUrl the url to connect to the mongodb database
@param {object} logger
@param {function} cb the callback function
Create a new mongoose connection .