mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Display info when connected to analytics mongo like we do for LS and main.
This commit is contained in:
parent
888d43fc5c
commit
9888bb7cef
1 changed files with 4 additions and 1 deletions
|
@ -31,6 +31,9 @@ AnalyticsLogEventSchema.statics.logEvent = (user, event, properties={}) ->
|
|||
unless config.proxy
|
||||
analyticsMongoose = mongoose.createConnection()
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue