UNPKG

n8n

Version:

n8n Workflow Automation Tool

40 lines (39 loc) 1.48 kB
import { Logger } from '../Logger'; import { ExecutionRepository } from '../databases/repositories/execution.repository'; import type { WorkflowExecuteMode as ExecutionMode } from 'n8n-workflow'; import type { IExecutingWorkflowData } from '../Interfaces'; import { Telemetry } from '../telemetry'; import { EventService } from '../events/event.service'; export declare const CLOUD_TEMP_PRODUCTION_LIMIT = 999; export declare const CLOUD_TEMP_REPORTABLE_THRESHOLDS: number[]; export declare class ConcurrencyControlService { private readonly logger; private readonly executionRepository; private readonly telemetry; private readonly eventService; private isEnabled; private readonly productionLimit; private readonly productionQueue; private readonly limitsToReport; constructor(logger: Logger, executionRepository: ExecutionRepository, telemetry: Telemetry, eventService: EventService); has(executionId: string): boolean; throttle({ mode, executionId }: { mode: ExecutionMode; executionId: string; }): Promise<void>; release({ mode }: { mode: ExecutionMode; }): void; remove({ mode, executionId }: { mode: ExecutionMode; executionId: string; }): void; removeAll(activeExecutions: { [executionId: string]: IExecutingWorkflowData; }): Promise<void>; disable(): void; private logInit; private isUnlimited; private log; private shouldReport; }