mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #17268 from overleaf/dp-remove-old-mongo-metrics
Remove timeAsyncMethod mongo metrics GitOrigin-RevId: 1ba3a1fd51b9d0766355c31791ae9836d832afe8
This commit is contained in:
@@ -9,12 +9,10 @@
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let Notifications
|
||||
const logger = require('@overleaf/logger')
|
||||
const { db, ObjectId } = require('./mongodb')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
module.exports = Notifications = {
|
||||
module.exports = {
|
||||
getUserNotifications(userId, callback) {
|
||||
if (callback == null) {
|
||||
callback = function () {}
|
||||
@@ -132,6 +130,3 @@ module.exports = Notifications = {
|
||||
db.notifications.deleteOne(searchOps, callback)
|
||||
},
|
||||
}
|
||||
;['getUserNotifications', 'addNotification'].map(method =>
|
||||
metrics.timeAsyncMethod(Notifications, method, 'mongo.Notifications', logger)
|
||||
)
|
||||
|
||||
@@ -41,7 +41,6 @@ describe('Notifications Tests', function () {
|
||||
requires: {
|
||||
'@overleaf/settings': {},
|
||||
'./mongodb': { db: this.db, ObjectId },
|
||||
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user