diff options
Diffstat (limited to 'worker.js')
| -rw-r--r-- | worker.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -250,12 +250,12 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI, // TODO: eliminate such cases earlier in the chain // and immediately NACK those broken matches, requeueing only the rest console.error(err); - await ch.nack(msgs.pop(), true, true); // nack all messages until the last and requeue + await Promise.all(msgs.map((m) => ch.nack(m, true)) ); // requeue return; // give up } console.log("acking batch"); - await ch.ack(msgs.pop(), true); // ack all messages until the last + await Promise.all(msgs.map((m) => ch.ack(m)) ); // notify compiler await Promise.all([ |
