mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
🐛 Fix that active executions could not be canceled in main mode
This commit is contained in:
@@ -74,8 +74,11 @@ export class WorkflowExecute {
|
|||||||
* @returns {(Promise<string>)}
|
* @returns {(Promise<string>)}
|
||||||
* @memberof WorkflowExecute
|
* @memberof WorkflowExecute
|
||||||
*/
|
*/
|
||||||
// @ts-ignore
|
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||||
async run(workflow: Workflow, startNode?: INode, destinationNode?: string): PCancelable<IRun> {
|
// PCancelable to a regular Promise and does so not allow canceling
|
||||||
|
// active executions anymore
|
||||||
|
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
||||||
|
run(workflow: Workflow, startNode?: INode, destinationNode?: string): PCancelable<IRun> {
|
||||||
// Get the nodes to start workflow execution from
|
// Get the nodes to start workflow execution from
|
||||||
startNode = startNode || workflow.getStartNode(destinationNode);
|
startNode = startNode || workflow.getStartNode(destinationNode);
|
||||||
|
|
||||||
@@ -134,8 +137,11 @@ export class WorkflowExecute {
|
|||||||
* @returns {(Promise<string>)}
|
* @returns {(Promise<string>)}
|
||||||
* @memberof WorkflowExecute
|
* @memberof WorkflowExecute
|
||||||
*/
|
*/
|
||||||
// @ts-ignore
|
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||||
async runPartialWorkflow(
|
// PCancelable to a regular Promise and does so not allow canceling
|
||||||
|
// active executions anymore
|
||||||
|
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
||||||
|
runPartialWorkflow(
|
||||||
workflow: Workflow,
|
workflow: Workflow,
|
||||||
runData: IRunData,
|
runData: IRunData,
|
||||||
startNodes: string[],
|
startNodes: string[],
|
||||||
@@ -576,8 +582,11 @@ export class WorkflowExecute {
|
|||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
* @memberof WorkflowExecute
|
* @memberof WorkflowExecute
|
||||||
*/
|
*/
|
||||||
// @ts-ignore
|
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||||
async processRunExecutionData(workflow: Workflow): PCancelable<IRun> {
|
// PCancelable to a regular Promise and does so not allow canceling
|
||||||
|
// active executions anymore
|
||||||
|
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
||||||
|
processRunExecutionData(workflow: Workflow): PCancelable<IRun> {
|
||||||
Logger.verbose('Workflow execution started', { workflowId: workflow.id });
|
Logger.verbose('Workflow execution started', { workflowId: workflow.id });
|
||||||
|
|
||||||
const startedAt = new Date();
|
const startedAt = new Date();
|
||||||
@@ -1063,8 +1072,7 @@ export class WorkflowExecute {
|
|||||||
startedAt: Date,
|
startedAt: Date,
|
||||||
workflow: Workflow,
|
workflow: Workflow,
|
||||||
executionError?: ExecutionError,
|
executionError?: ExecutionError,
|
||||||
// @ts-ignore
|
): Promise<IRun> {
|
||||||
): PCancelable<IRun> {
|
|
||||||
const fullRunData = this.getFullRunData(startedAt);
|
const fullRunData = this.getFullRunData(startedAt);
|
||||||
|
|
||||||
if (executionError !== undefined) {
|
if (executionError !== undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user