mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Disable analytics.users.active
This commit is contained in:
parent
da72991260
commit
6ab74f9dab
3 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
module.exports.handlers =
|
||||
# TODO: Disabling this until we know why our app servers CPU grows out of control.
|
||||
# 'analytics_log_event': 'analytics/analytics_log_event_handler'
|
||||
'analytics_users_active': 'analytics/analytics_users_active_handler'
|
||||
# 'analytics_users_active': 'analytics/analytics_users_active_handler'
|
||||
'article': 'articles/article_handler'
|
||||
'level': 'levels/level_handler'
|
||||
'level_component': 'levels/components/level_component_handler'
|
||||
|
|
|
@ -46,7 +46,9 @@ module.exports.setup = (app) ->
|
|||
log.error(errorMessage)
|
||||
log.error(error)
|
||||
log.error(error.stack)
|
||||
hipchat.sendTowerHipChatMessage errorMessage
|
||||
# TODO: Generally ignore this error: error: Error trying db method get route analytics.log.event from undefined: Error: Cannot find module '../undefined'
|
||||
unless "#{parts}" in ['analytics.log.event', 'analytics.users.active']
|
||||
hipchat.sendTowerHipChatMessage errorMessage
|
||||
errors.notFound(res, "Route #{req?.path} not found.")
|
||||
|
||||
getSchema = (req, res, moduleName) ->
|
||||
|
|
|
@ -189,6 +189,8 @@ UserSchema.methods.isPremium = ->
|
|||
return false
|
||||
|
||||
UserSchema.statics.saveActiveUser = (id, event, done=null) ->
|
||||
# TODO: Disabling this until we know why our app servers CPU grows out of control.
|
||||
return done?()
|
||||
id = mongoose.Types.ObjectId id if _.isString id
|
||||
@findById id, (err, user) ->
|
||||
if err?
|
||||
|
@ -198,6 +200,8 @@ UserSchema.statics.saveActiveUser = (id, event, done=null) ->
|
|||
done?()
|
||||
|
||||
UserSchema.methods.saveActiveUser = (event, done=null) ->
|
||||
# TODO: Disabling this until we know why our app servers CPU grows out of control.
|
||||
return done?()
|
||||
try
|
||||
return done?() if @isAdmin()
|
||||
userID = @get('_id')
|
||||
|
|
Loading…
Reference in a new issue