mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #15247 from overleaf/jpa-submission-backend-class
[web] use n2d instances for compiling submissions GitOrigin-RevId: 57eb27af230b994c3816c0476673ea558226ac1e
This commit is contained in:
parent
92a38e1311
commit
347da4e6bb
5 changed files with 13 additions and 7 deletions
|
@ -244,7 +244,7 @@ module.exports = CompileController = {
|
|||
}
|
||||
options.compileGroup =
|
||||
req.body?.compileGroup || Settings.defaultFeatures.compileGroup
|
||||
options.compileBackendClass = Settings.apis.clsi.defaultBackendClass
|
||||
options.compileBackendClass = Settings.apis.clsi.submissionBackendClass
|
||||
options.timeout =
|
||||
req.body?.timeout || Settings.defaultFeatures.compileTimeout
|
||||
ClsiManager.sendExternalRequest(
|
||||
|
@ -440,7 +440,7 @@ module.exports = CompileController = {
|
|||
req.body?.compileGroup ||
|
||||
req.query?.compileGroup ||
|
||||
Settings.defaultFeatures.compileGroup,
|
||||
compileBackendClass: Settings.apis.clsi.defaultBackendClass,
|
||||
compileBackendClass: Settings.apis.clsi.submissionBackendClass,
|
||||
}
|
||||
CompileController.proxyToClsiWithLimits(
|
||||
submissionId,
|
||||
|
|
|
@ -226,6 +226,8 @@ module.exports = {
|
|||
// url: "http://#{process.env['CLSI_LB_HOST']}:3014"
|
||||
backendGroupName: undefined,
|
||||
defaultBackendClass: process.env.CLSI_DEFAULT_BACKEND_CLASS || 'e2',
|
||||
submissionBackendClass:
|
||||
process.env.CLSI_SUBMISSION_BACKEND_CLASS || 'n2d',
|
||||
},
|
||||
project_history: {
|
||||
sendProjectStructureOps: true,
|
||||
|
|
|
@ -121,6 +121,7 @@ describe('ClsiManager', function () {
|
|||
clsi: {
|
||||
url: `http://${CLSI_HOST}`,
|
||||
defaultBackendClass: 'e2',
|
||||
submissionBackendClass: 'n2d',
|
||||
},
|
||||
clsi_priority: {
|
||||
url: 'https://clsipremium.example.com',
|
||||
|
|
|
@ -33,6 +33,7 @@ describe('CompileController', function () {
|
|||
clsi: {
|
||||
url: 'http://clsi.example.com',
|
||||
defaultBackendClass: 'e2',
|
||||
submissionBackendClass: 'n2d',
|
||||
},
|
||||
clsi_priority: {
|
||||
url: 'http://clsi-priority.example.com',
|
||||
|
@ -337,7 +338,7 @@ describe('CompileController', function () {
|
|||
this.ClsiManager.sendExternalRequest.should.have.been.calledWith(
|
||||
this.submission_id,
|
||||
{ compileGroup: 'special', timeout: 600 },
|
||||
{ compileGroup: 'special', compileBackendClass: 'e2', timeout: 600 }
|
||||
{ compileGroup: 'special', compileBackendClass: 'n2d', timeout: 600 }
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -368,7 +369,7 @@ describe('CompileController', function () {
|
|||
draft: true,
|
||||
check: 'validate',
|
||||
compileGroup: 'standard',
|
||||
compileBackendClass: 'e2',
|
||||
compileBackendClass: 'n2d',
|
||||
timeout: 60,
|
||||
}
|
||||
)
|
||||
|
@ -486,7 +487,7 @@ describe('CompileController', function () {
|
|||
{},
|
||||
{
|
||||
compileGroup: 'standard',
|
||||
compileBackendClass: 'e2',
|
||||
compileBackendClass: 'n2d',
|
||||
}
|
||||
)
|
||||
})
|
||||
|
@ -510,7 +511,7 @@ describe('CompileController', function () {
|
|||
{},
|
||||
{
|
||||
compileGroup: 'special',
|
||||
compileBackendClass: 'e2',
|
||||
compileBackendClass: 'n2d',
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
|
@ -22,7 +22,9 @@ describe('CompileManager', function () {
|
|||
this.CompileManager = SandboxedModule.require(MODULE_PATH, {
|
||||
requires: {
|
||||
'@overleaf/settings': (this.settings = {
|
||||
apis: { clsi: { defaultBackendClass: 'e2' } },
|
||||
apis: {
|
||||
clsi: { defaultBackendClass: 'e2', submissionBackendClass: 'n2d' },
|
||||
},
|
||||
redis: { web: { host: 'localhost', port: 42 } },
|
||||
rateLimit: { autoCompile: {} },
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue