fix(core): Bring back execution data on the executionFinished push message (#11821)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-11-22 19:09:48 +01:00
committed by GitHub
parent 13cc5abb7f
commit 03135702f1
5 changed files with 79 additions and 96 deletions

View File

@@ -5,6 +5,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import type { PushType } from '@n8n/api-types';
import { GlobalConfig } from '@n8n/config';
import { stringify } from 'flatted';
import { WorkflowExecute } from 'n8n-core';
import {
ApplicationError,
@@ -318,9 +319,17 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
workflowId,
});
const pushType =
fullRunData.status === 'waiting' ? 'executionWaiting' : 'executionFinished';
pushInstance.send(pushType, { executionId }, pushRef);
const { status } = fullRunData;
if (status === 'waiting') {
pushInstance.send('executionWaiting', { executionId }, pushRef);
} else {
const rawData = stringify(fullRunData.data);
pushInstance.send(
'executionFinished',
{ executionId, workflowId, status, rawData },
pushRef,
);
}
},
],
};