diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-04 21:04:41 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-04 21:04:41 +0200 |
| commit | 7d085bac26ca372a3c9bd097f7c7214af5fbb408 (patch) | |
| tree | a48d0f00ae6f2f6aafb25b60f2b960df8fc88670 | |
| parent | a6b1c4139a485595fd858fa447d893725d43a015 (diff) | |
| download | compiler-7d085bac26ca372a3c9bd097f7c7214af5fbb408.tar.gz compiler-7d085bac26ca372a3c9bd097f7c7214af5fbb408.zip | |
ack each message individually
| -rw-r--r-- | worker.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -209,11 +209,11 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", } catch (err) { // this should only happen for deadlocks or non-data related issues 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 analyzer Promise.all(participant_ext_records.map(async (p) => |
