mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08: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:
parent
50ff75ecb2
commit
042b8daf1c
|
@ -354,6 +354,7 @@ export class Worker extends Command {
|
|||
process.exit(2);
|
||||
} else {
|
||||
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);
|
||||
return executionId;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue