Comparing version 2.0.0-beta.8 to 2.0.0-beta.9
@@ -80,3 +80,4 @@ // Get requirements | ||
// of it. | ||
return reject(err) | ||
// return reject(err) | ||
throw err | ||
}) | ||
@@ -83,0 +84,0 @@ }) |
@@ -100,11 +100,6 @@ const debug = require('debug')('remit:request') | ||
console.log('acquiring') | ||
remit._workChannelPool.acquire().then((channel) => { | ||
workChannel = channel | ||
console.log('got') | ||
return workChannel.assertQueue(`d:${remit._options.exchange}:${options.event}:${expirationGroup}`, { | ||
messageTtl: expiration, | ||
let queueOpts = { | ||
exclusive: false, | ||
@@ -116,6 +111,10 @@ durable: true, | ||
expires: expiration * 2 | ||
}) | ||
} | ||
if (!localOpts.schedule) { | ||
queueOpts.messageTtl = expiration | ||
} | ||
return workChannel.assertQueue(`d:${remit._options.exchange}:${options.event}:${expirationGroup}`, queueOpts) | ||
}).then(() => { | ||
console.log('asserted') | ||
remit._workChannelPool.release(workChannel) | ||
@@ -187,2 +186,3 @@ | ||
messageOptions.headers.schedule = +localOpts.schedule | ||
messageOptions.expiration = expiration | ||
} else { | ||
@@ -209,4 +209,2 @@ messageOptions.headers.delay = localOpts.delay | ||
console.log('sending') | ||
publishChannel.sendToQueue( | ||
@@ -217,4 +215,2 @@ `d:${remit._options.exchange}:${options.event}:${expirationGroup}`, | ||
) | ||
console.log('sent to queue') | ||
} else { | ||
@@ -221,0 +217,0 @@ publishChannel.publish( |
{ | ||
"name": "remit", | ||
"version": "2.0.0-beta.8", | ||
"version": "2.0.0-beta.9", | ||
"description": "A small set of functionality used to create microservices that don't need to be aware of one-another's existence.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
43656