From e286aede4e53eace00eab4b012f508094d9210ee Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 19 May 2016 16:23:07 +0100 Subject: [PATCH 1/2] return the file path in the output file list for easy lookup --- services/clsi/app/coffee/CompileController.coffee | 1 + services/clsi/test/unit/coffee/CompileControllerTests.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/services/clsi/app/coffee/CompileController.coffee b/services/clsi/app/coffee/CompileController.coffee index 62b1020ad9..5cc9a5e2f4 100644 --- a/services/clsi/app/coffee/CompileController.coffee +++ b/services/clsi/app/coffee/CompileController.coffee @@ -34,6 +34,7 @@ module.exports = CompileController = error: error?.message or error outputFiles: outputFiles.map (file) -> url: "#{Settings.apis.clsi.url}/project/#{request.project_id}/output/#{file.path}" + path: file.path type: file.type build: file.build } diff --git a/services/clsi/test/unit/coffee/CompileControllerTests.coffee b/services/clsi/test/unit/coffee/CompileControllerTests.coffee index 6a18ce795f..d8d6e8620f 100644 --- a/services/clsi/test/unit/coffee/CompileControllerTests.coffee +++ b/services/clsi/test/unit/coffee/CompileControllerTests.coffee @@ -76,6 +76,7 @@ describe "CompileController", -> error: null outputFiles: @output_files.map (file) => url: "#{@Settings.apis.clsi.url}/project/#{@project_id}/output/#{file.path}" + path: file.path type: file.type build: file.build ) From 07401c5a451c9b07e89fc19c9a81c340939a21f0 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 19 May 2016 16:23:33 +0100 Subject: [PATCH 2/2] avoid clobbering the existing port variable --- services/clsi/app.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/clsi/app.coffee b/services/clsi/app.coffee index 275c6bf0c0..2a8e7b5f37 100644 --- a/services/clsi/app.coffee +++ b/services/clsi/app.coffee @@ -158,8 +158,8 @@ server = net.createServer (socket) -> socket.write("up, #{freeLoadPercentage}%\n", "ASCII") socket.end() -server.listen port = (Settings.internal?.clsi?.load_port or 3044), -> - logger.info "tcp load endpoint listening on port #{port}" +server.listen load_port = (Settings.internal?.clsi?.load_port or 3044), -> + logger.info "tcp load endpoint listening on port #{load_port}" # telnet 127.0.0.1 3044