mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
New global mode for rabbitmq events
This commit is contained in:
@@ -6,7 +6,7 @@ import cors from 'cors';
|
||||
import express, { json, NextFunction, Request, Response, urlencoded } from 'express';
|
||||
import { join } from 'path';
|
||||
|
||||
import { initAMQP } from './api/integrations/rabbitmq/libs/amqp.server';
|
||||
import { initAMQP, initGlobalQueues } from './api/integrations/rabbitmq/libs/amqp.server';
|
||||
import { initSQS } from './api/integrations/sqs/libs/sqs.server';
|
||||
import { initIO } from './api/integrations/websocket/libs/socket.server';
|
||||
import { HttpStatus, router } from './api/routes/index.router';
|
||||
@@ -128,7 +128,11 @@ function bootstrap() {
|
||||
|
||||
initIO(server);
|
||||
|
||||
if (configService.get<Rabbitmq>('RABBITMQ')?.ENABLED) initAMQP();
|
||||
if (configService.get<Rabbitmq>('RABBITMQ')?.ENABLED) {
|
||||
initAMQP().then(() => {
|
||||
if (configService.get<Rabbitmq>('RABBITMQ')?.GLOBAL_ENABLED) initGlobalQueues();
|
||||
});
|
||||
}
|
||||
|
||||
if (configService.get<Sqs>('SQS')?.ENABLED) initSQS();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user