mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[clsi] avoid server error when clearing cache while compiling (#32349)
* [clsi] avoid server error when clearing cache while compiling * [clsi] tweak API around releasing locks Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com> --------- Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com> GitOrigin-RevId: d3f171467d3bc26941758dd333f30049b37a05c8
This commit is contained in:
@@ -144,10 +144,15 @@ function _writeLogOutput(projectId, directory, output, callback) {
|
||||
})
|
||||
}
|
||||
|
||||
function isRunning(projectId) {
|
||||
const id = `${projectId}`
|
||||
return ProcessTable[id] != null
|
||||
}
|
||||
|
||||
function killLatex(projectId, callback) {
|
||||
const id = `${projectId}`
|
||||
logger.debug({ id }, 'killing running compile')
|
||||
if (ProcessTable[id] == null) {
|
||||
if (!isRunning(projectId)) {
|
||||
logger.warn({ id }, 'no such project to kill')
|
||||
callback(null)
|
||||
} else {
|
||||
@@ -208,6 +213,7 @@ function _buildLatexCommand(mainFile, opts = {}) {
|
||||
}
|
||||
|
||||
export default {
|
||||
isRunning,
|
||||
runLatex,
|
||||
killLatex,
|
||||
promises: {
|
||||
|
||||
Reference in New Issue
Block a user