mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Pass compile group correctly to Clsi._buildRequest
This commit is contained in:
parent
a570d05132
commit
e0178b17b5
2 changed files with 6 additions and 6 deletions
|
@ -8,11 +8,11 @@ logger = require "logger-sharelatex"
|
|||
url = require("url")
|
||||
|
||||
module.exports = ClsiManager =
|
||||
sendRequest: (project_id, settingsOverride = {}, callback = (error, success) ->) ->
|
||||
ClsiManager._buildRequest project_id, settingsOverride, (error, req) ->
|
||||
sendRequest: (project_id, options = {}, callback = (error, success) ->) ->
|
||||
ClsiManager._buildRequest project_id, options, (error, req) ->
|
||||
return callback(error) if error?
|
||||
logger.log project_id: project_id, "sending compile to CLSI"
|
||||
ClsiManager._postToClsi project_id, req, settingsOverride.compiler, (error, response) ->
|
||||
ClsiManager._postToClsi project_id, req, options.compileGroup, (error, response) ->
|
||||
return callback(error) if error?
|
||||
logger.log project_id: project_id, response: response, "received compile response from CLSI"
|
||||
callback(
|
||||
|
@ -29,8 +29,8 @@ module.exports = ClsiManager =
|
|||
deleteAuxFiles: (project_id, callback = (error) ->) ->
|
||||
request.del "#{Settings.apis.clsi.url}/project/#{project_id}", callback
|
||||
|
||||
_postToClsi: (project_id, req, compiler, callback = (error, response) ->) ->
|
||||
if compiler == "priority"
|
||||
_postToClsi: (project_id, req, compileGroup, callback = (error, response) ->) ->
|
||||
if compileGroup == "priority"
|
||||
compilerUrl = Settings.apis.clsi_priority.url
|
||||
else
|
||||
compilerUrl = Settings.apis.clsi.url
|
||||
|
|
|
@ -41,7 +41,7 @@ describe "ClsiManager", ->
|
|||
type: "log"
|
||||
}]
|
||||
})
|
||||
@ClsiManager.sendRequest @project_id, {compiler:"standard"}, @callback
|
||||
@ClsiManager.sendRequest @project_id, {compileGroup:"standard"}, @callback
|
||||
|
||||
it "should build the request", ->
|
||||
@ClsiManager._buildRequest
|
||||
|
|
Loading…
Reference in a new issue