mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
🐛 Fix bug when executing n8n from different folder
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
|||||||
WorkflowExecuteMode,
|
WorkflowExecuteMode,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
|
import { join as pathJoin } from 'path';
|
||||||
import { fork } from 'child_process';
|
import { fork } from 'child_process';
|
||||||
|
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ export class WorkflowRunner {
|
|||||||
*/
|
*/
|
||||||
async run(data: IWorkflowExecutionDataProcess): Promise<string> {
|
async run(data: IWorkflowExecutionDataProcess): Promise<string> {
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
const subprocess = fork('./dist/src/WorkflowRunnerProcess.js');
|
const subprocess = fork(pathJoin(__dirname, 'WorkflowRunnerProcess.js'));
|
||||||
|
|
||||||
// Register the active execution
|
// Register the active execution
|
||||||
const executionId = this.activeExecutions.add(subprocess, data);
|
const executionId = this.activeExecutions.add(subprocess, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user