update to new metrics api

This commit is contained in:
Shane Kilkelly 2017-03-17 15:54:15 +00:00
parent e67c546254
commit 5f0bf16c75

View file

@ -82,13 +82,8 @@ module.exports = Notifications =
db.notifications.remove searchOps, {justOne: true}, callback
metrics.timeAsyncMethod(
Notifications, 'getUserNotifications',
'Notifications.getUserNotifications',
logger
)
metrics.timeAsyncMethod(
Notifications, 'addNotification',
'Notifications.addNotification',
logger
)
[
'getUserNotifications',
'addNotification'
].map (method) ->
metrics.timeAsyncMethod(Notifications, method, 'mongo.Notifications', logger)