[web] avoid trying to fetch synctex.gz from clsi-cache in free projects (#25445)

* [web] avoid trying to fetch synctex.gz from clsi-cache in free projects

* [clsi] parse boolean query parameter

GitOrigin-RevId: 99c98aac8147a626b704e9a888b7fc660cc5ab17
This commit is contained in:
Jakob Ackermann
2025-05-12 08:05:24 +00:00
committed by Copybot
parent 9e07549ecb
commit fba8f776a1
2 changed files with 10 additions and 2 deletions
+4 -2
View File
@@ -191,7 +191,8 @@ function clearCache(req, res, next) {
}
function syncFromCode(req, res, next) {
const { file, editorId, buildId, compileFromClsiCache } = req.query
const { file, editorId, buildId } = req.query
const compileFromClsiCache = req.query.compileFromClsiCache === 'true'
const line = parseInt(req.query.line, 10)
const column = parseInt(req.query.column, 10)
const { imageName } = req.query
@@ -220,7 +221,8 @@ function syncFromPdf(req, res, next) {
const page = parseInt(req.query.page, 10)
const h = parseFloat(req.query.h)
const v = parseFloat(req.query.v)
const { imageName, editorId, buildId, compileFromClsiCache } = req.query
const { imageName, editorId, buildId } = req.query
const compileFromClsiCache = req.query.compileFromClsiCache === 'true'
const projectId = req.params.project_id
const userId = req.params.user_id
CompileManager.syncFromPdf(
@@ -553,6 +553,12 @@ const _CompileController = {
async _proxyToClsi(projectId, action, url, qs, req, res) {
const limits =
await CompileManager.promises.getProjectCompileLimits(projectId)
if (
qs?.compileFromClsiCache &&
!['alpha', 'priority'].includes(limits.compileGroup)
) {
qs.compileFromClsiCache = false
}
return CompileController._proxyToClsiWithLimits(
projectId,
action,