summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-08-17 21:05:33 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-08-17 21:05:33 +0200
commitdb8d2565a598f745ca59ecf1279d5b54a084118b (patch)
tree4241d9de876c0a59d0170deeae402894f54587f8
parent2afa7d7e453f6e1c8bfdd59d6ba0b99b13099aa2 (diff)
downloadcruncher-db8d2565a598f745ca59ecf1279d5b54a084118b.tar.gz
cruncher-db8d2565a598f745ca59ecf1279d5b54a084118b.zip
send points_update to crunch.participant_id
-rw-r--r--worker.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/worker.js b/worker.js
index 2a6523b..9d40469 100644
--- a/worker.js
+++ b/worker.js
@@ -120,8 +120,11 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => {
await Promise.map(msgs, async (m) => await ch.ack(m));
// notify web
// TODO notify for player too
- // TODO fix these
- await ch.publish("amq.topic", "global", new Buffer("points_update"));
+ await Promise.map(api_ids, (id) => {
+ await ch.publish("amq.topic",
+ "crunch." + id,
+ new Buffer("points_update"));
+ });
}
// execute the script