Display info when connected to analytics mongo like we do for LS and main.

This commit is contained in:
Rob 2016-09-02 16:00:50 -07:00
parent 888d43fc5c
commit 9888bb7cef

View file

@ -31,6 +31,9 @@ AnalyticsLogEventSchema.statics.logEvent = (user, event, properties={}) ->
unless config.proxy unless config.proxy
analyticsMongoose = mongoose.createConnection() analyticsMongoose = mongoose.createConnection()
analyticsMongoose.open config.mongo.analytics_replica_string, (error) -> analyticsMongoose.open config.mongo.analytics_replica_string, (error) ->
log.error "Couldn't connect to analytics", error if error if error
log.error "Couldn't connect to analytics", error
else
log.info "Connected to analytics mongo at #{config.mongo.analytics_replica_string}"
module.exports = AnalyticsLogEvent = analyticsMongoose.model('analytics.log.event', AnalyticsLogEventSchema, config.mongo.analytics_collection) module.exports = AnalyticsLogEvent = analyticsMongoose.model('analytics.log.event', AnalyticsLogEventSchema, config.mongo.analytics_collection)