Skip to content

Commit 4251e82

Browse files
committed
Add rabbitmq logs
1 parent c16b325 commit 4251e82

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

backend/matching-service/config/rabbitmq.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const sendRabbitMq = async (
3232
try {
3333
const senderChannel = await mrConnection.createChannel();
3434
senderChannel.sendToQueue(queue, Buffer.from(JSON.stringify(data)));
35+
console.log("Sent to queue:", JSON.stringify(data));
3536
return true;
3637
} catch (error) {
3738
console.log(error);

backend/matching-service/src/utils/mq_utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export const matchUsers = (newRequest: string) => {
3434
if (isMatch(newRequestJson, pendingRequest)) {
3535
matchingRequests.delete(uid);
3636
createMatch(pendingRequest, newRequestJson);
37+
console.log(
38+
"Matched users:",
39+
JSON.stringify(newRequestJson),
40+
JSON.stringify(pendingRequest)
41+
);
3742
return;
3843
}
3944
}

0 commit comments

Comments
 (0)