mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Amend per several review comments
- Removed unused vars - Label the metric with the bucket name
This commit is contained in:
parent
feca8933f1
commit
ece650741a
1 changed files with 1 additions and 7 deletions
|
@ -1,14 +1,9 @@
|
|||
PersistorManager = require("./PersistorManager")
|
||||
settings = require("settings-sharelatex")
|
||||
logger = require("logger-sharelatex")
|
||||
FileHandler = require("./FileHandler")
|
||||
metrics = require("metrics-sharelatex")
|
||||
parseRange = require('range-parser')
|
||||
Errors = require('./Errors')
|
||||
|
||||
oneDayInSeconds = 60 * 60 * 24
|
||||
maxSizeInBytes = 1024 * 1024 * 1024 # 1GB
|
||||
|
||||
module.exports = BucketController =
|
||||
|
||||
getFile: (req, res)->
|
||||
|
@ -21,7 +16,7 @@ module.exports = BucketController =
|
|||
bucket: bucket,
|
||||
credentials: credentials
|
||||
}
|
||||
metrics.inc "getFile"
|
||||
metrics.inc "#{bucket}.getFile"
|
||||
logger.log key:key, bucket:bucket, "receiving request to get file from bucket"
|
||||
FileHandler.getFile bucket, key, options, (err, fileStream)->
|
||||
if err?
|
||||
|
@ -33,4 +28,3 @@ module.exports = BucketController =
|
|||
else
|
||||
logger.log key:key, bucket:bucket, format:format, style:style, "sending bucket file to response"
|
||||
fileStream.pipe res
|
||||
|
||||
|
|
Loading…
Reference in a new issue