n8n
Version:
n8n Workflow Automation Tool
30 lines (29 loc) • 1.51 kB
TypeScript
import { Logger } from '@n8n/backend-common';
import { ExecutionRepository } from '@n8n/db';
import { InstanceSettings } from 'n8n-core';
import { type IRun, type RelatedExecution } from 'n8n-workflow';
import { ActiveExecutions } from './active-executions';
import { ExecutionPersistence } from './executions/execution-persistence';
import { OwnershipService } from './services/ownership.service';
import { WorkflowRunner } from './workflow-runner';
export declare class WaitTracker {
private readonly logger;
private readonly executionRepository;
private readonly executionPersistence;
private readonly ownershipService;
private readonly activeExecutions;
private readonly workflowRunner;
private readonly instanceSettings;
private waitingExecutions;
mainTimer: NodeJS.Timeout;
constructor(logger: Logger, executionRepository: ExecutionRepository, executionPersistence: ExecutionPersistence, ownershipService: OwnershipService, activeExecutions: ActiveExecutions, workflowRunner: WorkflowRunner, instanceSettings: InstanceSettings);
has(executionId: string): boolean;
init(): void;
private startTracking;
getWaitingExecutions(): Promise<void>;
stopExecution(executionId: string): void;
startExecution(executionId: string): Promise<void>;
resumeParentExecution(parentExecution: RelatedExecution, executePromise: Promise<IRun | undefined>, childExecution?: RelatedExecution): Promise<void>;
private withRetry;
stopTracking(): void;
}