From db8d2565a598f745ca59ecf1279d5b54a084118b Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 17 Aug 2017 21:05:33 +0200 Subject: send points_update to crunch.participant_id --- worker.js | 7 +++++-- 1 file 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 -- cgit v1.3.1