diff --git a/packages/core/src/node-execution-context/__tests__/shared-tests.ts b/packages/core/src/node-execution-context/__tests__/shared-tests.ts index 72a53a0d9f..9992507bdd 100644 --- a/packages/core/src/node-execution-context/__tests__/shared-tests.ts +++ b/packages/core/src/node-execution-context/__tests__/shared-tests.ts @@ -14,7 +14,7 @@ import type { RelatedExecution, IExecuteWorkflowInfo, } from 'n8n-workflow'; -import { ApplicationError, NodeHelpers, WAIT_TIME_UNLIMITED } from 'n8n-workflow'; +import { ApplicationError, NodeHelpers, WAIT_INDEFINITELY } from 'n8n-workflow'; import Container from 'typedi'; import { BinaryDataService } from '@/BinaryData/BinaryData.service'; @@ -235,7 +235,7 @@ export const describeCommonTests = ( }); expect(additionalData.setExecutionStatus).toHaveBeenCalledWith('waiting'); - expect(runExecutionData.waitTill).toEqual(new Date(WAIT_TIME_UNLIMITED)); + expect(runExecutionData.waitTill).toEqual(WAIT_INDEFINITELY); expect(result.waitTill).toBe(waitTill); }); }); diff --git a/packages/core/src/node-execution-context/base-execute-context.ts b/packages/core/src/node-execution-context/base-execute-context.ts index eed2d29684..0794a263b0 100644 --- a/packages/core/src/node-execution-context/base-execute-context.ts +++ b/packages/core/src/node-execution-context/base-execute-context.ts @@ -22,12 +22,7 @@ import type { ISourceData, AiEvent, } from 'n8n-workflow'; -import { - ApplicationError, - NodeHelpers, - WAIT_TIME_UNLIMITED, - WorkflowDataProxy, -} from 'n8n-workflow'; +import { ApplicationError, NodeHelpers, WAIT_INDEFINITELY, WorkflowDataProxy } from 'n8n-workflow'; import { Container } from 'typedi'; import { BinaryDataService } from '@/BinaryData/BinaryData.service'; @@ -131,7 +126,7 @@ export class BaseExecuteContext extends NodeExecutionContext { if (result.waitTill) { // then put the parent workflow execution also into the waiting state, // but do not use the sub-workflow `waitTill` to avoid WaitTracker resuming the parent execution at the same time as the sub-workflow - await this.putExecutionToWait(new Date(WAIT_TIME_UNLIMITED)); + await this.putExecutionToWait(WAIT_INDEFINITELY); } const data = await this.binaryDataService.duplicateBinaryData( diff --git a/packages/editor-ui/src/components/Node.vue b/packages/editor-ui/src/components/Node.vue index 1f1ea90ab5..f20724bd5f 100644 --- a/packages/editor-ui/src/components/Node.vue +++ b/packages/editor-ui/src/components/Node.vue @@ -9,7 +9,6 @@ import { SIMULATE_NODE_TYPE, SIMULATE_TRIGGER_NODE_TYPE, WAIT_NODE_TYPE, - WAIT_TIME_UNLIMITED, } from '@/constants'; import type { ExecutionSummary, @@ -18,7 +17,12 @@ import type { NodeOperationError, Workflow, } from 'n8n-workflow'; -import { NodeConnectionType, NodeHelpers, SEND_AND_WAIT_OPERATION } from 'n8n-workflow'; +import { + NodeConnectionType, + NodeHelpers, + SEND_AND_WAIT_OPERATION, + WAIT_INDEFINITELY, +} from 'n8n-workflow'; import type { StyleValue } from 'vue'; import { computed, onMounted, ref, watch } from 'vue'; import xss from 'xss'; @@ -345,7 +349,7 @@ const waiting = computed(() => { return i18n.baseText('node.theNodeIsWaitingFormCall'); } const waitDate = new Date(workflowExecution.waitTill); - if (waitDate.toISOString() === WAIT_TIME_UNLIMITED) { + if (waitDate.getTime() === WAIT_INDEFINITELY.getTime()) { return i18n.baseText('node.theNodeIsWaitingIndefinitelyForAnIncomingWebhookCall'); } return i18n.baseText('node.nodeIsWaitingTill', { diff --git a/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue b/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue index 1fbbfd542a..d179476531 100644 --- a/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue +++ b/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue @@ -1,8 +1,8 @@