Skip to content

Commit 2728f4c

Browse files
committed
update
1 parent c488128 commit 2728f4c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

statsd-rabbitmq-backend/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function RabbitmqBackend(startupTime, config, emitter) {
2121
this.lastException = startupTime;
2222
this.config = config;
2323

24-
this.connection = require('amqplib').connect(this.config.amqp.connection);
24+
this.connection = require('amqplib').connect(this.config.amqp.connection);
2525

2626
// attach
2727
emitter.on('flush', function(timestamp, metrics) {
@@ -84,9 +84,10 @@ RabbitmqBackend.prototype.flush = function(timestamp, metrics) {
8484
this.ch = conn.createChannel();
8585
return this.ch;
8686
}).then(function(ch) {
87-
return ch.assertQueue(queue).then(function(ok) {
88-
return ch.sendToQueue(queue, Buffer.from(msg));
89-
});
87+
return ch.assertQueue(queue).then(function(ok) {
88+
console.log('Sent ', msg);
89+
return ch.sendToQueue(queue, Buffer.from(msg));
90+
});
9091
}).catch(console.warn);
9192
};
9293

0 commit comments

Comments
 (0)