Skip to content

Commit

Permalink
fix sonar bug
Browse files Browse the repository at this point in the history
  • Loading branch information
juacompe committed May 5, 2023
1 parent b1d6dff commit 8ceb7f2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions api/src/queue/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ module.exports = class Sender {
}

send(queue, msg) {
try {
Sender.createChannel(queue).then((channel) => {
Sender.createChannel(queue)
.then((channel) => {
channel.sendToQueue(queue, Buffer.from(msg));
console.log(" [x] Sent %s", msg);
});
} catch (e) {
console.log(e);
}
})
.catch((e) => console.log(e));
}

static connect() {
Expand Down

0 comments on commit 8ceb7f2

Please sign in to comment.