Prechádzať zdrojové kódy

Merge pull request #1848 from overleaf/sk-increase-compile-timeout-hard-limit-10

Increase compile socket timeout to 10 minutes

GitOrigin-RevId: 93712c493c67bf54022df43175d331557b7cf49a
Timothée Alby 7 rokov pred
rodič
commit
f6c2cfe727

+ 4 - 2
services/web/app/src/Features/Compile/CompileController.js

@@ -31,12 +31,14 @@ const ClsiCookieManager = require('./ClsiCookieManager')(
 )
 const Path = require('path')
 
+const COMPILE_TIMEOUT_MS = 10 * 60 * 1000
+
 module.exports = CompileController = {
   compile(req, res, next) {
     if (next == null) {
       next = function(error) {}
     }
-    res.setTimeout(5 * 60 * 1000)
+    res.setTimeout(COMPILE_TIMEOUT_MS)
     const project_id = req.params.Project_id
     const isAutoCompile = !!(req.query != null
       ? req.query.auto_compile
@@ -118,7 +120,7 @@ module.exports = CompileController = {
     if (next == null) {
       next = function(error) {}
     }
-    res.setTimeout(5 * 60 * 1000)
+    res.setTimeout(COMPILE_TIMEOUT_MS)
     const { submission_id } = req.params
     const options = {}
     if ((req.body != null ? req.body.rootResourcePath : undefined) != null) {