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 = {
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

View file

@ -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,

View file

@ -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;