import { Logger } from '@n8n/backend-common'; import { EventService } from '@n8n/backend-services'; import { MemoryGuardConfig } from '@n8n/config'; import { WorkflowRepository } from '@n8n/db'; import { type WorkflowExecuteAfterContext } from '@n8n/decorators'; import { ActiveExecutions } from '../active-executions'; import { ExecutionRecoveryService } from '../executions/execution-recovery.service'; import { UserManagementMailer } from '../user-management/email/user-management-mailer'; import { WorkflowPushNotifier } from '../workflows/workflow-push-notifier.service'; import { ProductionHold } from './production-hold'; import { RunDataTracker } from './run-data-tracker'; import { MemoryGuardJournal } from './memory-guard-journal'; import { MemoryStoppedExecutions } from './memory-stopped-executions'; export declare class MemoryGuardService { private readonly logger; private readonly config; private readonly activeExecutions; private readonly productionHold; private readonly tracker; private readonly memoryStoppedExecutions; private readonly eventService; private readonly journal; private readonly workflowRepository; private readonly executionRecoveryService; private readonly mailer; private readonly workflowPushNotifier; private timer; private isShutDown; private containerLimit; private oldGenerationLimit; private forceGc; private lastUtilization; private holdStreak; private stopStreak; private holdStartedAt; private fastSamplingUntil; private admitBatch; private lastAdmitAt; private utilizationAtLastAdmit; private lastStarvationAdmitAt; private lastStopEndedAt; private pendingStop; private pendingStopWorkflowId; private isStandingDown; private isHoldSuspended; private readonly stopsByWorkflow; private readonly deactivating; constructor(logger: Logger, config: MemoryGuardConfig, activeExecutions: ActiveExecutions, productionHold: ProductionHold, tracker: RunDataTracker, memoryStoppedExecutions: MemoryStoppedExecutions, eventService: EventService, journal: MemoryGuardJournal, workflowRepository: WorkflowRepository, executionRecoveryService: ExecutionRecoveryService, mailer: UserManagementMailer, workflowPushNotifier: WorkflowPushNotifier); init(): void; shutdown(): void; private scheduleNext; private check; private get isHolding(); private evaluate; private suspendHold; private hasRunningExecution; private admitOneHeld; private getStop; private readUsageAfterGc; private hasHoldLimitPassed; private admitHeldGradually; private startHold; private endHold; private stop; private finishStop; private measureAfterStop; private findStopTarget; private nodeTypeIn; private findRoot; onExecutionEnd({ workflow, mode, runData }: WorkflowExecuteAfterContext): void; private countStop; private deactivate; private notifyDeactivated; }