Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
Revert "Propagate errors from backend connection (#81)" (#86)
Browse files Browse the repository at this point in the history
This reverts commit 96207bd.
  • Loading branch information
mher authored Mar 19, 2017
1 parent 96207bd commit 3e6c60b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions celery.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,18 @@ function Client(conf) {
self.emit('message', msg);
});
} else if (self.conf.backend_type === 'amqp') {
self.backend = amqp.createConnection(self.conf.BROKER_OPTIONS, {
self.backend = amqp.createConnection({
url: self.conf.BROKER_URL,
heartbeat: 580
}, {
defaultExchangeName: self.conf.DEFAULT_EXCHANGE
});
} else if (self.conf.backend_type === self.conf.broker_type) {
if (self.conf.backend_type === 'amqp') {
self.backend = self.broker;
}
}

self.backend.on('error', function(err) {
self.emit('error', err);
});

// backend ready...
self.backend.on('ready', function() {
debug('Connecting to broker...');
Expand Down

0 comments on commit 3e6c60b

Please sign in to comment.