refactor(core): Persist node execution order, and forward it to the frontend (#14455)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-04-09 10:19:58 +02:00
committed by GitHub
parent 707ecb63ae
commit 9ba58ca80b
41 changed files with 235 additions and 113 deletions

View File

@@ -68,7 +68,7 @@ function hookFunctionsPush(
if (!pushRef) return;
const logger = Container.get(Logger);
const pushInstance = Container.get(Push);
hooks.addHandler('nodeExecuteBefore', function (nodeName) {
hooks.addHandler('nodeExecuteBefore', function (nodeName, data) {
const { executionId } = this;
// Push data to session which started workflow before each
// node which starts rendering
@@ -78,7 +78,10 @@ function hookFunctionsPush(
workflowId: this.workflowData.id,
});
pushInstance.send({ type: 'nodeExecuteBefore', data: { executionId, nodeName } }, pushRef);
pushInstance.send(
{ type: 'nodeExecuteBefore', data: { executionId, nodeName, data } },
pushRef,
);
});
hooks.addHandler('nodeExecuteAfter', function (nodeName, data) {
const { executionId } = this;