mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Chore/leave default timeout for sandbox execution (#5263)
leave default timeout for sandbox execution
This commit is contained in:
@@ -132,9 +132,7 @@ class CustomFunction_Utilities implements INode {
|
||||
const sandbox = createCodeExecutionSandbox(input, variables, flow, additionalSandbox)
|
||||
|
||||
try {
|
||||
const response = await executeJavaScriptCode(javascriptFunction, sandbox, {
|
||||
timeout: 10000
|
||||
})
|
||||
const response = await executeJavaScriptCode(javascriptFunction, sandbox)
|
||||
|
||||
if (typeof response === 'string' && !isEndingNode) {
|
||||
return handleEscapeCharacters(response, false)
|
||||
|
||||
@@ -131,16 +131,12 @@ class IfElseFunction_Utilities implements INode {
|
||||
const sandbox = createCodeExecutionSandbox(input, variables, flow, additionalSandbox)
|
||||
|
||||
try {
|
||||
const responseTrue = await executeJavaScriptCode(ifFunction, sandbox, {
|
||||
timeout: 10000
|
||||
})
|
||||
const responseTrue = await executeJavaScriptCode(ifFunction, sandbox)
|
||||
|
||||
if (responseTrue)
|
||||
return { output: typeof responseTrue === 'string' ? handleEscapeCharacters(responseTrue, false) : responseTrue, type: true }
|
||||
|
||||
const responseFalse = await executeJavaScriptCode(elseFunction, sandbox, {
|
||||
timeout: 10000
|
||||
})
|
||||
const responseFalse = await executeJavaScriptCode(elseFunction, sandbox)
|
||||
|
||||
return { output: typeof responseFalse === 'string' ? handleEscapeCharacters(responseFalse, false) : responseFalse, type: false }
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user