diff --git a/packages/cli/src/commands/base-command.ts b/packages/cli/src/commands/base-command.ts index b75d9684e68..0f7a1f6348c 100644 --- a/packages/cli/src/commands/base-command.ts +++ b/packages/cli/src/commands/base-command.ts @@ -26,7 +26,6 @@ import config from '@/config'; import { N8N_VERSION, N8N_RELEASE_DATE } from '@/constants'; import * as CrashJournal from '@/crash-journal'; import { getDataDeduplicationService } from '@/deduplication'; -import { DeprecationService } from '@/deprecation/deprecation.service'; import { TestRunCleanupService } from '@/evaluation.ee/test-runner/test-run-cleanup.service.ee'; import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { TelemetryEventRelay } from '@/events/relays/telemetry.event-relay'; @@ -124,8 +123,6 @@ export abstract class BaseCommand { // Initialize the auth roles service to make sure that roles are correctly setup for the instance await Container.get(AuthRolesService).init(); - Container.get(DeprecationService).warn(); - if (process.env.EXECUTIONS_PROCESS === 'own') process.exit(-1); if ( diff --git a/packages/cli/src/commands/start.ts b/packages/cli/src/commands/start.ts index 5ffd35e83ca..b52f3ed943c 100644 --- a/packages/cli/src/commands/start.ts +++ b/packages/cli/src/commands/start.ts @@ -34,6 +34,7 @@ import { WorkflowRunner } from '@/workflow-runner'; import { BaseCommand } from './base-command'; import { CredentialsOverwrites } from '@/credentials-overwrites'; +import { DeprecationService } from '@/deprecation/deprecation.service'; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const open = require('open'); @@ -200,6 +201,8 @@ export class Start extends BaseCommand> { await super.init(); + Container.get(DeprecationService).warn(); + this.activeWorkflowManager = Container.get(ActiveWorkflowManager); const isMultiMainEnabled = diff --git a/packages/cli/src/commands/webhook.ts b/packages/cli/src/commands/webhook.ts index 0aabe0fa972..9dc616ecfaf 100644 --- a/packages/cli/src/commands/webhook.ts +++ b/packages/cli/src/commands/webhook.ts @@ -7,6 +7,7 @@ import { Publisher } from '@/scaling/pubsub/publisher.service'; import { PubSubRegistry } from '@/scaling/pubsub/pubsub.registry'; import { Subscriber } from '@/scaling/pubsub/subscriber.service'; import { WebhookServer } from '@/webhooks/webhook-server'; +import { DeprecationService } from '@/deprecation/deprecation.service'; import { BaseCommand } from './base-command'; @@ -62,6 +63,7 @@ export class Webhook extends BaseCommand { this.logger.debug(`Host ID: ${this.instanceSettings.hostId}`); await super.init(); + Container.get(DeprecationService).warn(); await this.initLicense(); this.logger.debug('License init complete'); diff --git a/packages/cli/src/commands/worker.ts b/packages/cli/src/commands/worker.ts index 2b7836c03c3..ccd6082ee32 100644 --- a/packages/cli/src/commands/worker.ts +++ b/packages/cli/src/commands/worker.ts @@ -17,6 +17,7 @@ import { WorkerStatusService } from '@/scaling/worker-status.service.ee'; import { BaseCommand } from './base-command'; import { CredentialsOverwrites } from '@/credentials-overwrites'; +import { DeprecationService } from '@/deprecation/deprecation.service'; const flagsSchema = z.object({ concurrency: z.number().int().default(10).describe('How many jobs can run in parallel.'), @@ -87,6 +88,8 @@ export class Worker extends BaseCommand> { await this.setConcurrency(); await super.init(); + Container.get(DeprecationService).warn(); + await this.initLicense(); this.logger.debug('License init complete'); await Container.get(CredentialsOverwrites).init();