diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-17 21:05:33 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-17 21:05:33 +0200 |
| commit | db8d2565a598f745ca59ecf1279d5b54a084118b (patch) | |
| tree | 4241d9de876c0a59d0170deeae402894f54587f8 | |
| parent | 2afa7d7e453f6e1c8bfdd59d6ba0b99b13099aa2 (diff) | |
| download | cruncher-db8d2565a598f745ca59ecf1279d5b54a084118b.tar.gz cruncher-db8d2565a598f745ca59ecf1279d5b54a084118b.zip | |
send points_update to crunch.participant_id
| -rw-r--r-- | worker.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |
