mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
removed uneeded passing of clsiServer to _parseOutputFiles and improve logging
This commit is contained in:
parent
3c5eb9a730
commit
a24f635531
1 changed files with 3 additions and 5 deletions
|
@ -19,12 +19,12 @@ module.exports = ClsiManager =
|
||||||
if error?
|
if error?
|
||||||
logger.err err:error, project_id:project_id, "error sending request to clsi"
|
logger.err err:error, project_id:project_id, "error sending request to clsi"
|
||||||
return callback(error)
|
return callback(error)
|
||||||
logger.log project_id: project_id, response: response, "received compile response from CLSI"
|
logger.log project_id: project_id, outputFilesLength: response?.outputFiles?.length, status: response?.status, "received compile response from CLSI"
|
||||||
ClsiCookieManager._getServerId project_id, (err, clsiServerId)->
|
ClsiCookieManager._getServerId project_id, (err, clsiServerId)->
|
||||||
if err?
|
if err?
|
||||||
logger.err err:err, project_id:project_id, "error getting server id"
|
logger.err err:err, project_id:project_id, "error getting server id"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
outputFiles = ClsiManager._parseOutputFiles(project_id, response?.compile?.outputFiles, clsiServerId)
|
outputFiles = ClsiManager._parseOutputFiles(project_id, response?.compile?.outputFiles)
|
||||||
callback(null, response?.compile?.status, outputFiles, clsiServerId)
|
callback(null, response?.compile?.status, outputFiles, clsiServerId)
|
||||||
|
|
||||||
deleteAuxFiles: (project_id, options, callback = (error) ->) ->
|
deleteAuxFiles: (project_id, options, callback = (error) ->) ->
|
||||||
|
@ -72,11 +72,9 @@ module.exports = ClsiManager =
|
||||||
logger.error err: error, project_id: project_id, "CLSI returned failure code"
|
logger.error err: error, project_id: project_id, "CLSI returned failure code"
|
||||||
callback error, body
|
callback error, body
|
||||||
|
|
||||||
_parseOutputFiles: (project_id, rawOutputFiles = [], clsiServer) ->
|
_parseOutputFiles: (project_id, rawOutputFiles = []) ->
|
||||||
# console.log rawOutputFiles
|
|
||||||
outputFiles = []
|
outputFiles = []
|
||||||
for file in rawOutputFiles
|
for file in rawOutputFiles
|
||||||
console.log path
|
|
||||||
path = url.parse(file.url).path
|
path = url.parse(file.url).path
|
||||||
path = path.replace("/project/#{project_id}/output/", "")
|
path = path.replace("/project/#{project_id}/output/", "")
|
||||||
outputFiles.push
|
outputFiles.push
|
||||||
|
|
Loading…
Reference in a new issue