[misc] add a metric for failing downloads

This commit is contained in:
Jakob Ackermann 2020-03-26 11:18:50 +01:00 committed by Jakob Ackermann
parent 697e1466dc
commit 6777432569
2 changed files with 2 additions and 0 deletions

View file

@ -324,6 +324,7 @@ module.exports = ResourceWriter = {
},
'error downloading file for resources'
)
Metrics.inc('download-failed')
}
return callback()
}

View file

@ -36,6 +36,7 @@ describe('ResourceWriter', function() {
'./OutputFileFinder': (this.OutputFileFinder = {}),
'logger-sharelatex': { log: sinon.stub(), err: sinon.stub() },
'./Metrics': (this.Metrics = {
inc: sinon.stub(),
Timer: (Timer = (function() {
Timer = class Timer {
static initClass() {