From a24f635531b4252d07b2e9f3583aa63aeb26eb5f Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Sat, 21 May 2016 10:23:17 +0100 Subject: [PATCH] removed uneeded passing of clsiServer to _parseOutputFiles and improve logging --- .../web/app/coffee/Features/Compile/ClsiManager.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/ClsiManager.coffee b/services/web/app/coffee/Features/Compile/ClsiManager.coffee index ef347a17e0..4a33a1a00c 100755 --- a/services/web/app/coffee/Features/Compile/ClsiManager.coffee +++ b/services/web/app/coffee/Features/Compile/ClsiManager.coffee @@ -19,12 +19,12 @@ module.exports = ClsiManager = if error? logger.err err:error, project_id:project_id, "error sending request to clsi" 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)-> if err? logger.err err:err, project_id:project_id, "error getting server id" 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) 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" callback error, body - _parseOutputFiles: (project_id, rawOutputFiles = [], clsiServer) -> - # console.log rawOutputFiles + _parseOutputFiles: (project_id, rawOutputFiles = []) -> outputFiles = [] for file in rawOutputFiles - console.log path path = url.parse(file.url).path path = path.replace("/project/#{project_id}/output/", "") outputFiles.push