فهرست منبع

update to new metrics api

Shane Kilkelly 9 سال پیش
والد
کامیت
5f0bf16c75
1فایلهای تغییر یافته به همراه5 افزوده شده و 10 حذف شده
  1. 5 10
      services/notifications/app/coffee/Notifications.coffee

+ 5 - 10
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)