docs: function getMongooseConnection(uri, mongooseConnection, cb) {
    logger.debug("getting mongoose connection");
    var mongooseConn;
    if (mongooseConnection && typeof mongooseConnection.useDb === 'function') {
      process.nextTick(function() {
        logger.debug("creating the mongoose connection using the existing connection", {uri: uri});
        var dbName = getDbName(uri);
        mongooseConn = mongooseConnection.useDb(dbName);
        return cb(undefined, mongooseConn);
      });
    } else {
      process.nextTick(function() {
        logger.warn("creating a new mongoose connection", {uri: uri});
        mongooseConn = mongoose.createConnection(uri);
        return cb(undefined, mongooseConn);
      });
    }
  }