mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
feat: Added rabbitmq to send events
This commit is contained in:
parent
f1571b5f66
commit
56d621bab8
@ -27,7 +27,7 @@ export const initAMQP = () => {
|
||||
channel.assertExchange(exchangeName, 'topic', { durable: false });
|
||||
amqpChannel = channel;
|
||||
|
||||
logger.log('AMQP initialized');
|
||||
logger.info('AMQP initialized');
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
@ -11,7 +11,6 @@ let io: SocketIO;
|
||||
const cors = configService.get<Cors>('CORS').ORIGIN;
|
||||
|
||||
export const initIO = (httpServer: Server) => {
|
||||
logger.verbose('Initializing Socket.io');
|
||||
io = new SocketIO(httpServer, {
|
||||
cors: {
|
||||
origin: cors,
|
||||
@ -19,12 +18,14 @@ export const initIO = (httpServer: Server) => {
|
||||
});
|
||||
|
||||
io.on('connection', (socket) => {
|
||||
logger.verbose('Client connected');
|
||||
logger.info('User connected');
|
||||
|
||||
socket.on('disconnect', () => {
|
||||
logger.verbose('Client disconnected');
|
||||
logger.info('User disconnected');
|
||||
});
|
||||
});
|
||||
|
||||
logger.info('Socket.io initialized');
|
||||
return io;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user