From bd755cd19f20f07353450acd10d0000d13c301c0 Mon Sep 17 00:00:00 2001 From: GEgorov Date: Mon, 15 Dec 2025 16:15:59 +0300 Subject: [PATCH] modified: backend/src/services/ScriptExecutor.ts --- backend/src/services/ScriptExecutor.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/services/ScriptExecutor.ts b/backend/src/services/ScriptExecutor.ts index 686361a..c022387 100644 --- a/backend/src/services/ScriptExecutor.ts +++ b/backend/src/services/ScriptExecutor.ts @@ -108,9 +108,9 @@ export class ScriptExecutor { const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor; const userFunction = new AsyncFunction('params', 'execQuery', code); - // Устанавливаем таймаут + // Устанавливаем таймаут (10 минут) const timeoutPromise = new Promise((_, reject) => { - setTimeout(() => reject(new Error('Script execution timeout (30s)')), 30000); + setTimeout(() => reject(new Error('Script execution timeout (10min)')), 600000); }); // Выполняем скрипт с таймаутом @@ -322,11 +322,11 @@ print(json.dumps(result)) } }); - // Таймаут 30 секунд + // Таймаут 10 минут setTimeout(() => { python.kill(); - reject(new Error('Python script execution timeout (30s)')); - }, 30000); + reject(new Error('Python script execution timeout (10min)')); + }, 600000); }); }