mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 01:23:59 +00:00
removed clsi priorty url
This commit is contained in:
parent
11724fce13
commit
c918028d14
3 changed files with 2 additions and 27 deletions
|
@ -53,13 +53,10 @@ module.exports = ClsiManager =
|
|||
|
||||
|
||||
_getCompilerUrl: (compileGroup) ->
|
||||
if compileGroup == "priority"
|
||||
return Settings.apis.clsi_priority.url
|
||||
else
|
||||
return Settings.apis.clsi.url
|
||||
return Settings.apis.clsi.url
|
||||
|
||||
_postToClsi: (project_id, req, compileGroup, callback = (error, response) ->) ->
|
||||
compilerUrl = @_getCompilerUrl(compileGroup)
|
||||
compilerUrl = Settings.apis.clsi.url
|
||||
opts =
|
||||
url: "#{compilerUrl}/project/#{project_id}/compile"
|
||||
json: req
|
||||
|
|
|
@ -88,8 +88,6 @@ module.exports =
|
|||
url: "http://localhost:3009"
|
||||
clsi:
|
||||
url: "http://localhost:3013"
|
||||
clsi_priority:
|
||||
url: "http://localhost:3013"
|
||||
templates:
|
||||
url: "http://localhost:3007"
|
||||
githubSync:
|
||||
|
|
|
@ -101,14 +101,6 @@ describe "ClsiManager", ->
|
|||
it "should call the callback", ->
|
||||
@callback.called.should.equal true
|
||||
|
||||
describe "with the priority compileGroup", ->
|
||||
beforeEach ->
|
||||
@ClsiManager.deleteAuxFiles @project_id, {compileGroup: "priority"}, @callback
|
||||
|
||||
it "should call the delete method in the CLSI", ->
|
||||
@ClsiManager._makeRequest
|
||||
.calledWith(@project_id, { method:"DELETE", url:"#{@settings.apis.clsi_priority.url}/project/#{@project_id}"})
|
||||
.should.equal true
|
||||
|
||||
describe "_buildRequest", ->
|
||||
beforeEach ->
|
||||
|
@ -264,18 +256,6 @@ describe "ClsiManager", ->
|
|||
it "should call the callback with the body and the error", ->
|
||||
@callback.calledWith(new Error("CLSI returned non-success code: 500"), @body).should.equal true
|
||||
|
||||
describe "when the compiler is priority", ->
|
||||
beforeEach ->
|
||||
@ClsiManager._makeRequest = sinon.stub()
|
||||
@ClsiManager._postToClsi @project_id, @req, "priority", @callback
|
||||
|
||||
it "should use the clsi_priority url", ->
|
||||
url = "#{@settings.apis.clsi_priority.url}/project/#{@project_id}/compile"
|
||||
@ClsiManager._makeRequest.calledWith(@project_id, {
|
||||
method: "POST",
|
||||
url: url
|
||||
json: @req
|
||||
}).should.equal true
|
||||
|
||||
describe "wordCount", ->
|
||||
beforeEach ->
|
||||
|
|
Loading…
Reference in a new issue