add a new execution status type executionWaiting

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-11-12 11:52:40 +01:00
parent 314504c456
commit 27578ccdcc
No known key found for this signature in database
3 changed files with 16 additions and 2 deletions

View file

@ -12,6 +12,15 @@ type ExecutionStarted = {
};
};
type ExecutionWaiting = {
type: 'executionWaiting';
data: {
executionId: string;
data: IRun;
retryOf?: string;
};
};
type ExecutionFinished = {
type: 'executionFinished';
data: {
@ -47,6 +56,7 @@ type NodeExecuteAfter = {
export type ExecutionPushMessage =
| ExecutionStarted
| ExecutionWaiting
| ExecutionFinished
| ExecutionRecovered
| NodeExecuteBefore

View file

@ -347,9 +347,11 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
executionId,
workflowId,
});
// TODO: Look at this again
const pushType =
fullRunData.status === 'waiting' ? 'executionWaiting' : 'executionFinished';
pushInstance.send(
'executionFinished',
pushType,
{
executionId,
data: pushRunData,

View file

@ -499,6 +499,8 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
runDataExecutedStartData: runDataExecuted.data.startData,
resultDataError: runDataExecuted.data.resultData.error,
});
} else if (receivedData.type === 'executionWaiting') {
// TODO: Do something here
} else if (receivedData.type === 'executionStarted') {
const pushData = receivedData.data;