ejhayes/bull-monitor

View on GitHub

Showing 5 of 63 total issues

Function main has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const main = async () => {
  log('Creating queue');
  const queue = new Bull.Queue(config.QUEUE, {
    prefix: config.PREFIX,
    connection: {
Severity: Major
Found in bull_generator.ts - About 3 hrs to fix

    Function initializePublisher has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private async initializePublisher() {
        return this._redisMutex.runExclusive(async () => {
          this.logger.log(
            'Redis connection READY! Configuring watchers for bull queues.',
          );
    Severity: Minor
    Found in src/bull/bull-queues.service.ts - About 1 hr to fix

      Function addQueue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private addQueue(queuePrefix: string, queueName: string) {
          return this._bullMutex.runExclusive(async () => {
            const queueKey = this.generateQueueKey(queuePrefix, queueName);
            this.logger.debug(`Attempting to add queue: ${queueKey}`);
            if (!(queueKey in this._queues)) {
      Severity: Minor
      Found in src/bull/bull-queues.service.ts - About 1 hr to fix

        Function onModuleDestroy has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async onModuleDestroy() {
            this.logger.log('Destroying module');
        
            this.eventEmitter.removeAllListeners();
        
        
        Severity: Minor
        Found in src/bull/bull-queues.service.ts - About 1 hr to fix

          Function registerRedisEventListeners has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private async registerRedisEventListeners() {
              if (this._initialized) return;
          
              const subscriber = this.redisService.getClient(REDIS_CLIENTS.SUBSCRIBE);
              const queuePrefixes =
          Severity: Minor
          Found in src/bull/bull-queues.service.ts - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language