Skip to content

Commit

Permalink
remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdanh27600 committed May 15, 2024
1 parent 84c83ed commit d8b09d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/queue/rabbit/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const amqp = require('amqplib');
const { logger, isTest } = require('../utils');
const { postProcessForward } = require('../postProcessForward');
const { isLocal } = require('types/constants');


// RabbitMQ connection URL
Expand All @@ -27,7 +28,7 @@ async function sendMessageToRabbitQueue(message) {
// Create the queue if it doesn't exist
await channel.assertQueue(queueName, { durable: false });

console.log("Sending...", message)
if (isLocal) console.log("Sending...", message);
// Send the message to the queue
channel.sendToQueue(queueName, Buffer.from(JSON.stringify(message)));

Expand Down

0 comments on commit d8b09d5

Please sign in to comment.