From a0822d3c554cefad00caff5d2c70d0e52f9c62a1 Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 18 May 2023 18:33:04 +0300 Subject: [PATCH] fix: avoid providing gateways for worker Signed-off-by: mertmit --- packages/nocodb/src/modules/global/global.module.ts | 4 ++-- packages/nocodb/src/modules/jobs/jobs.module.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/modules/global/global.module.ts b/packages/nocodb/src/modules/global/global.module.ts index b7aa2d6005..80de0630a2 100644 --- a/packages/nocodb/src/modules/global/global.module.ts +++ b/packages/nocodb/src/modules/global/global.module.ts @@ -47,7 +47,7 @@ export const JwtStrategyProvider: Provider = { UsersService, JwtStrategyProvider, GlobalGuard, - SocketGateway, + ...(!process.env['NC_WORKER_CONTAINER'] ? [SocketGateway] : []), ], exports: [ AppInitService, @@ -56,7 +56,7 @@ export const JwtStrategyProvider: Provider = { JwtStrategyProvider, UsersService, GlobalGuard, - SocketGateway, + ...(!process.env['NC_WORKER_CONTAINER'] ? [SocketGateway] : []), ], }) export class GlobalModule {} diff --git a/packages/nocodb/src/modules/jobs/jobs.module.ts b/packages/nocodb/src/modules/jobs/jobs.module.ts index 98231f5325..e1ac65cc29 100644 --- a/packages/nocodb/src/modules/jobs/jobs.module.ts +++ b/packages/nocodb/src/modules/jobs/jobs.module.ts @@ -30,8 +30,8 @@ import { AtImportProcessor } from './at-import/at-import.processor'; : []), ], providers: [ + ...(!process.env['NC_WORKER_CONTAINER'] ? [JobsGateway] : []), QueueService, - JobsGateway, JobsService, JobsEventService, ExportService,