mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
rabbitmq
This commit is contained in:
parent
b65d292af4
commit
73c003907b
@ -687,14 +687,14 @@ export class WAStartupService {
|
||||
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
|
||||
const exchangeName = this.instanceName ?? 'evolution_exchange';
|
||||
|
||||
amqp.assertExchange(exchangeName, 'topic', {
|
||||
await amqp.assertExchange(exchangeName, 'topic', {
|
||||
durable: true,
|
||||
autoDelete: false,
|
||||
});
|
||||
|
||||
const queueName = `${this.instanceName}.${event}`;
|
||||
|
||||
amqp.assertQueue(queueName, {
|
||||
await amqp.assertQueue(queueName, {
|
||||
durable: true,
|
||||
autoDelete: false,
|
||||
arguments: {
|
||||
@ -702,7 +702,7 @@ export class WAStartupService {
|
||||
},
|
||||
});
|
||||
|
||||
amqp.bindQueue(queueName, exchangeName, event);
|
||||
await amqp.bindQueue(queueName, exchangeName, event);
|
||||
|
||||
const message = {
|
||||
event,
|
||||
@ -717,7 +717,7 @@ export class WAStartupService {
|
||||
message['apikey'] = instanceApikey;
|
||||
}
|
||||
|
||||
amqp.publish(exchangeName, event, Buffer.from(JSON.stringify(message)));
|
||||
await amqp.publish(exchangeName, event, Buffer.from(JSON.stringify(message)));
|
||||
|
||||
if (this.configService.get<Log>('LOG').LEVEL.includes('WEBHOOKS')) {
|
||||
const logData = {
|
||||
|
Loading…
Reference in New Issue
Block a user