Skip to content

Commit

Permalink
fix(core): Fix manually running a pinned trigger with offloading enab…
Browse files Browse the repository at this point in the history
…led (#12491)
  • Loading branch information
ivov authored Jan 8, 2025
1 parent 9953477 commit be2dcff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/cli/src/workflows/workflow-execution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ export class WorkflowExecutionService {
triggerToStartFrom,
};

const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name];

if (pinnedTrigger && !hasRunData(pinnedTrigger)) {
data.startNodes = [{ name: pinnedTrigger.name, sourceData: null }];
}

/**
* Historically, manual executions in scaling mode ran in the main process,
* so some execution details were never persisted in the database.
Expand All @@ -160,7 +166,7 @@ export class WorkflowExecutionService {
) {
data.executionData = {
startData: {
startNodes,
startNodes: data.startNodes,
destinationNode,
},
resultData: {
Expand All @@ -176,12 +182,6 @@ export class WorkflowExecutionService {
};
}

const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name];

if (pinnedTrigger && !hasRunData(pinnedTrigger)) {
data.startNodes = [{ name: pinnedTrigger.name, sourceData: null }];
}

const executionId = await this.workflowRunner.run(data);

return {
Expand Down

0 comments on commit be2dcff

Please sign in to comment.