fix(core): Fix manually running a pinned trigger with offloading enabled (#12491)

This commit is contained in:
Iván Ovejero 2025-01-08 13:39:52 +01:00 committed by GitHub
parent 9953477450
commit be2dcffc94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.
@ -160,7 +166,7 @@ export class WorkflowExecutionService {
) {
data.executionData = {
startData: {
startNodes,
startNodes: data.startNodes,
destinationNode,
},
resultData: {
@ -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 {