hunk.code_window:     private integrationRepository: IntegrationRepository,
       private deactivateSimilarChannelIntegrations: DeactivateSimilarChannelIntegrations,
       private analyticsService: AnalyticsService,
       private disableNovuIntegration: DisableNovuIntegration,
       private getIsMultiProviderConfigurationEnabled: GetIsMultiProviderConfigurationEnabled
     ) {}
     private async calculatePriorityAndPrimary(command: CreateIntegrationCommand) {
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.file_path: apps/api/src/app/integrations/usecases/create-integration/create-integration.usecase.ts
hunk.type: replace
file: import { Queue } from 'bullmq';
  import { ConnectionOptions } from 'tls';
  
  export class TestingQueueService {
    public queue: Queue;
  
    constructor(name: string) {
      this.queue = new Queue(name, {
        connection: {
          db: Number(process.env.REDIS_DB_INDEX || '1'),
          port: Number(process.env.REDIS_PORT || 6379),
          host: process.env.REDIS_HOST,
          password: process.env.REDIS_PASSWORD,
          connectTimeout: 50000,
          keepAlive: 30000,
          tls: process.env.REDIS_TLS as ConnectionOptions,
        },
        defaultJobOptions: {
          removeOnComplete: true,
        },
      });
  
      if (process.env.NODE_ENV === 'test' && !process.env.CI) {
        this.queue.obliterate({ force: true });
      }
    }
  }
  