refactor: Replace Pyodide with native Python with env flag is enabled (#19403)

This commit is contained in:
Iván Ovejero
2025-09-11 11:28:12 +02:00
committed by GitHub
parent 18cccb29ea
commit 052e24ef0e
7 changed files with 42 additions and 14 deletions

View File

@@ -132,7 +132,8 @@ export class FrontendService {
versionCli: N8N_VERSION,
concurrency: this.globalConfig.executions.concurrency.productionLimit,
isNativePythonRunnerEnabled:
this.globalConfig.taskRunners.enabled && process.env.N8N_NATIVE_PYTHON_RUNNER === 'true',
this.globalConfig.taskRunners.enabled &&
this.globalConfig.taskRunners.isNativePythonRunnerEnabled,
authCookie: {
secure: this.globalConfig.auth.cookie.secure,
},

View File

@@ -118,7 +118,7 @@ export class TaskRunnerModule {
await this.jsRunnerProcess.start();
if (process.env.N8N_NATIVE_PYTHON_RUNNER === 'true') {
if (this.runnerConfig.isNativePythonRunnerEnabled) {
const { PyTaskRunnerProcess } = await import('@/task-runners/task-runner-process-py');
this.pyRunnerProcess = Container.get(PyTaskRunnerProcess);
this.pyRunnerProcessRestartLoopDetector = new TaskRunnerProcessRestartLoopDetector(