mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
add a new execution status type executionWaiting
This commit is contained in:
parent
314504c456
commit
27578ccdcc
|
@ -12,6 +12,15 @@ type ExecutionStarted = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type ExecutionWaiting = {
|
||||||
|
type: 'executionWaiting';
|
||||||
|
data: {
|
||||||
|
executionId: string;
|
||||||
|
data: IRun;
|
||||||
|
retryOf?: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
type ExecutionFinished = {
|
type ExecutionFinished = {
|
||||||
type: 'executionFinished';
|
type: 'executionFinished';
|
||||||
data: {
|
data: {
|
||||||
|
@ -47,6 +56,7 @@ type NodeExecuteAfter = {
|
||||||
|
|
||||||
export type ExecutionPushMessage =
|
export type ExecutionPushMessage =
|
||||||
| ExecutionStarted
|
| ExecutionStarted
|
||||||
|
| ExecutionWaiting
|
||||||
| ExecutionFinished
|
| ExecutionFinished
|
||||||
| ExecutionRecovered
|
| ExecutionRecovered
|
||||||
| NodeExecuteBefore
|
| NodeExecuteBefore
|
||||||
|
|
|
@ -347,9 +347,11 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
|
||||||
executionId,
|
executionId,
|
||||||
workflowId,
|
workflowId,
|
||||||
});
|
});
|
||||||
// TODO: Look at this again
|
|
||||||
|
const pushType =
|
||||||
|
fullRunData.status === 'waiting' ? 'executionWaiting' : 'executionFinished';
|
||||||
pushInstance.send(
|
pushInstance.send(
|
||||||
'executionFinished',
|
pushType,
|
||||||
{
|
{
|
||||||
executionId,
|
executionId,
|
||||||
data: pushRunData,
|
data: pushRunData,
|
||||||
|
|
|
@ -499,6 +499,8 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
|
||||||
runDataExecutedStartData: runDataExecuted.data.startData,
|
runDataExecutedStartData: runDataExecuted.data.startData,
|
||||||
resultDataError: runDataExecuted.data.resultData.error,
|
resultDataError: runDataExecuted.data.resultData.error,
|
||||||
});
|
});
|
||||||
|
} else if (receivedData.type === 'executionWaiting') {
|
||||||
|
// TODO: Do something here
|
||||||
} else if (receivedData.type === 'executionStarted') {
|
} else if (receivedData.type === 'executionStarted') {
|
||||||
const pushData = receivedData.data;
|
const pushData = receivedData.data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue