Skip to content

Commit

Permalink
Remove unnecessary code in queueController
Browse files Browse the repository at this point in the history
  • Loading branch information
iynixil committed Oct 20, 2024
1 parent 555291d commit 4a6e591
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions backend/matching-service/controller/queueController.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ async function checkMatchingSameQueue(topic, difficultyLevel, email, token, user

}


const userList = [];

const firstUserData = JSON.parse(firstUser.content.toString());
Expand All @@ -112,12 +111,7 @@ async function checkMatchingSameQueue(topic, difficultyLevel, email, token, user

}



return null;
// Close the channel and connection after processing
await channel.close();
await conn.close();
} catch (err) {
console.error(`Error -> ${err}`);
}
Expand Down Expand Up @@ -156,8 +150,6 @@ async function checkMatchingAnyQueue(topic, difficultyLevel, email, token, isAny
queueKey = `${userInPriorityQueueData.topic} ${userInPriorityQueueData.difficultyLevel}`;
}



const chosenUser = await channel.get(queueKey, { noAck: false });
if (!chosenUser || !chosenUser.content) {
continue;
Expand Down

0 comments on commit 4a6e591

Please sign in to comment.