Эх сурвалжийг харах

update to new metrics api

Shane Kilkelly 9 жил өмнө
parent
commit
5f0bf16c75

+ 5 - 10
services/notifications/app/coffee/Notifications.coffee

@@ -82,13 +82,8 @@ module.exports = Notifications =
 		db.notifications.remove searchOps, {justOne: true}, callback
 		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)