mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Fix crashes in queue mode (#3397)
* Add catch block to avoid crashes when running in queue mode * Throwing errors that happen in worker so process stops
This commit is contained in:
@@ -354,6 +354,7 @@ export class Worker extends Command {
|
|||||||
process.exit(2);
|
process.exit(2);
|
||||||
} else {
|
} else {
|
||||||
logger.error('Error from queue: ', error);
|
logger.error('Error from queue: ', error);
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -561,6 +561,12 @@ export class WorkflowRunner {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
workflowExecution.catch(() => {
|
||||||
|
// We `reject` this promise if the execution fails
|
||||||
|
// but the error is handled already by processError
|
||||||
|
// So we're just preventing crashes here.
|
||||||
|
});
|
||||||
|
|
||||||
this.activeExecutions.attachWorkflowExecution(executionId, workflowExecution);
|
this.activeExecutions.attachWorkflowExecution(executionId, workflowExecution);
|
||||||
return executionId;
|
return executionId;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user