summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-31 20:41:52 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-31 20:41:52 +0200
commitf4421abda87f9f98d5fd0de88b9e70b146eb91b2 (patch)
tree38efb865968ebf1f3414df06043d629e691810d2
parent171c4212ecee8d28bbfbce659cbc7075887c0bd1 (diff)
downloadshrinker-f4421abda87f9f98d5fd0de88b9e70b146eb91b2.tar.gz
shrinker-f4421abda87f9f98d5fd0de88b9e70b146eb91b2.zip
do the cheap ACK
-rw-r--r--worker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker.js b/worker.js
index 4c79f31..b9268f8 100644
--- a/worker.js
+++ b/worker.js
@@ -146,7 +146,7 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost",
// COMMIT
await transaction.commit();
console.log("acking batch");
- await Promise.all(msgs.map(async (msg) => await ch.ack(msg) ));
+ await ch.ack(msgs.pop(), true); // ack all messages until the last
// request child jobs, notify player
await Promise.all(matches.map(async (m) =>
await Promise.all(m.rosters.map(async (r) =>