Skip to content

Commit 73c0039

Browse files
committed
rabbitmq
1 parent b65d292 commit 73c0039

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/whatsapp/services/whatsapp.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,22 +687,22 @@ export class WAStartupService {
687687
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
688688
const exchangeName = this.instanceName ?? 'evolution_exchange';
689689

690-
amqp.assertExchange(exchangeName, 'topic', {
690+
await amqp.assertExchange(exchangeName, 'topic', {
691691
durable: true,
692692
autoDelete: false,
693693
});
694694

695695
const queueName = `${this.instanceName}.${event}`;
696696

697-
amqp.assertQueue(queueName, {
697+
await amqp.assertQueue(queueName, {
698698
durable: true,
699699
autoDelete: false,
700700
arguments: {
701701
'x-queue-type': 'quorum',
702702
},
703703
});
704704

705-
amqp.bindQueue(queueName, exchangeName, event);
705+
await amqp.bindQueue(queueName, exchangeName, event);
706706

707707
const message = {
708708
event,
@@ -717,7 +717,7 @@ export class WAStartupService {
717717
message['apikey'] = instanceApikey;
718718
}
719719

720-
amqp.publish(exchangeName, event, Buffer.from(JSON.stringify(message)));
720+
await amqp.publish(exchangeName, event, Buffer.from(JSON.stringify(message)));
721721

722722
if (this.configService.get<Log>('LOG').LEVEL.includes('WEBHOOKS')) {
723723
const logData = {

0 commit comments

Comments
 (0)