From 5f0bf16c75afd3a9214a87853e2415d40404647a Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 17 Mar 2017 15:54:15 +0000 Subject: [PATCH] update to new metrics api --- .../notifications/app/coffee/Notifications.coffee | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/services/notifications/app/coffee/Notifications.coffee b/services/notifications/app/coffee/Notifications.coffee index 78459df411..87bac8505d 100644 --- a/services/notifications/app/coffee/Notifications.coffee +++ b/services/notifications/app/coffee/Notifications.coffee @@ -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)