Remove the Metrics module, use metrics-sharelatex

This commit is contained in:
Shane Kilkelly 2017-04-03 15:17:29 +01:00
parent b10f3adf2b
commit 9a9f0f5c4d
5 changed files with 4 additions and 5 deletions

View file

@ -1 +0,0 @@
module.exports = require "metrics-sharelatex"

View file

@ -6,7 +6,7 @@ S3S = require 's3-streams'
JSONStream = require "JSONStream" JSONStream = require "JSONStream"
ReadlineStream = require "byline" ReadlineStream = require "byline"
zlib = require "zlib" zlib = require "zlib"
Metrics = require "./Metrics" Metrics = require "metrics-sharelatex"
DAYS = 24 * 3600 * 1000 # one day in milliseconds DAYS = 24 * 3600 * 1000 # one day in milliseconds

View file

@ -4,7 +4,7 @@ _ = require "underscore"
logger = require "logger-sharelatex" logger = require "logger-sharelatex"
LockManager = require "./LockManager" LockManager = require "./LockManager"
MongoAWS = require "./MongoAWS" MongoAWS = require "./MongoAWS"
Metrics = require "./Metrics" Metrics = require "metrics-sharelatex"
ProjectIterator = require "./ProjectIterator" ProjectIterator = require "./ProjectIterator"
# Sharejs operations are stored in a 'pack' object # Sharejs operations are stored in a 'pack' object

View file

@ -26,7 +26,7 @@ describe "MongoAWS", ->
"./mongojs" : { db: @db = {}, ObjectId: ObjectId } "./mongojs" : { db: @db = {}, ObjectId: ObjectId }
"JSONStream": @JSONStream = {} "JSONStream": @JSONStream = {}
"readline-stream": @readline = sinon.stub() "readline-stream": @readline = sinon.stub()
'./Metrics': {inc: ()->} 'metrics-sharelatex': {inc: ()->}
@project_id = ObjectId().toString() @project_id = ObjectId().toString()
@doc_id = ObjectId().toString() @doc_id = ObjectId().toString()

View file

@ -20,7 +20,7 @@ describe "PackManager", ->
"./LockManager" : {} "./LockManager" : {}
"./MongoAWS": {} "./MongoAWS": {}
"logger-sharelatex": { log: sinon.stub(), error: sinon.stub() } "logger-sharelatex": { log: sinon.stub(), error: sinon.stub() }
'./Metrics': {inc: ()->} 'metrics-sharelatex': {inc: ()->}
@callback = sinon.stub() @callback = sinon.stub()
@doc_id = ObjectId().toString() @doc_id = ObjectId().toString()
@project_id = ObjectId().toString() @project_id = ObjectId().toString()