From 92e002797dbf9ef5e067e17337ea63f52dfee553 Mon Sep 17 00:00:00 2001 From: Demian Parkhomenko <95881717+DemianParkhomenko@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:15:04 +0300 Subject: [PATCH] Revert `consumer.ts` file --- src/consumer.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/consumer.ts b/src/consumer.ts index 2498712..a508f20 100644 --- a/src/consumer.ts +++ b/src/consumer.ts @@ -118,9 +118,7 @@ export async function consumeMessages( queueName: ConsumeMessagesConfig | string, handler: MessageHandler ) { - console.log('📍 consumeMessages', queueName); let prefetch: number | undefined; - const channel = await getDefaultChannel(); if (typeof queueName !== 'string') { if (!queueName.queues || queueName.queues.length !== 1) { throw new Error( @@ -135,6 +133,7 @@ export async function consumeMessages( } } + const channel = await getDefaultChannel(); const queue = getMessageBusConfig().queues.find((q) => q.name === queueName); const consumerTag = `${ process.env.HOSTNAME || 'no.env.HOSTNAME'