mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 14:40:47 +02:00
Merge pull request #8649 from overleaf/jpa-halt-on-error-flag
[web] record stopOnFirstError in compile-result-backend event GitOrigin-RevId: f194daa1cb377e095acf7a280ff5ba7859b8736b
This commit is contained in:
@@ -32,11 +32,13 @@ module.exports = CompileController = {
|
||||
const isAutoCompile = !!req.query.auto_compile
|
||||
const enablePdfCaching = !!req.query.enable_pdf_caching
|
||||
const fileLineErrors = !!req.query.file_line_errors
|
||||
const stopOnFirstError = !!req.body.stopOnFirstError
|
||||
const userId = SessionManager.getLoggedInUserId(req.session)
|
||||
const options = {
|
||||
isAutoCompile,
|
||||
enablePdfCaching,
|
||||
fileLineErrors,
|
||||
stopOnFirstError,
|
||||
}
|
||||
|
||||
if (req.body.rootDoc_id) {
|
||||
@@ -54,9 +56,6 @@ module.exports = CompileController = {
|
||||
if (req.body.draft) {
|
||||
options.draft = req.body.draft
|
||||
}
|
||||
if (req.body.stopOnFirstError) {
|
||||
options.stopOnFirstError = req.body.stopOnFirstError
|
||||
}
|
||||
if (['validate', 'error', 'silent'].includes(req.body.check)) {
|
||||
options.check = req.body.check
|
||||
}
|
||||
@@ -105,6 +104,7 @@ module.exports = CompileController = {
|
||||
timeout: limits.timeout === 60 ? 'short' : 'long',
|
||||
server: clsiServerId?.includes('-c2d-') ? 'faster' : 'normal',
|
||||
isAutoCompile,
|
||||
stopOnFirstError,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ describe('CompileController', function () {
|
||||
isAutoCompile: false,
|
||||
enablePdfCaching: false,
|
||||
fileLineErrors: false,
|
||||
stopOnFirstError: false,
|
||||
})
|
||||
.should.equal(true)
|
||||
})
|
||||
@@ -209,6 +210,7 @@ describe('CompileController', function () {
|
||||
isAutoCompile: true,
|
||||
enablePdfCaching: false,
|
||||
fileLineErrors: false,
|
||||
stopOnFirstError: false,
|
||||
})
|
||||
.should.equal(true)
|
||||
})
|
||||
@@ -227,6 +229,7 @@ describe('CompileController', function () {
|
||||
enablePdfCaching: false,
|
||||
draft: true,
|
||||
fileLineErrors: false,
|
||||
stopOnFirstError: false,
|
||||
})
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user