mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-13 22:05:50 +00: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:
parent
9fba03e70a
commit
3b84710d75
2 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue