Showing 5 of 63 total issues
Function main
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const main = async () => {
log('Creating queue');
const queue = new Bull.Queue(config.QUEUE, {
prefix: config.PREFIX,
connection: {
Function initializePublisher
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async initializePublisher() {
return this._redisMutex.runExclusive(async () => {
this.logger.log(
'Redis connection READY! Configuring watchers for bull queues.',
);
Function addQueue
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)) {
Function onModuleDestroy
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async onModuleDestroy() {
this.logger.log('Destroying module');
this.eventEmitter.removeAllListeners();
Function registerRedisEventListeners
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async registerRedisEventListeners() {
if (this._initialized) return;
const subscriber = this.redisService.getClient(REDIS_CLIENTS.SUBSCRIBE);
const queuePrefixes =