diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-04 11:06:17 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-04 11:06:17 +0200 |
| commit | b7b7528a0639e0ad4cd1bdac0d021752ddbf0401 (patch) | |
| tree | c7933864ee7083727e91a631ba8163890895dd64 | |
| parent | a41d397a57be9e7595baa9310f83d2d6a411175f (diff) | |
| download | compiler-b7b7528a0639e0ad4cd1bdac0d021752ddbf0401.tar.gz compiler-b7b7528a0639e0ad4cd1bdac0d021752ddbf0401.zip | |
send notifications for participant stats
| -rw-r--r-- | worker.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -202,7 +202,11 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", await ch.ack(msgs.pop(), true); // ack all messages until the last // notify web - await Promise.all(players.map(async (p) => await ch.publish("amq.topic", "player." + p.name, - new Buffer("stats_update")) )); + await Promise.all([ + Promise.all(players.map(async (p) => await ch.publish("amq.topic", "player." + p.name, + new Buffer("stats_update")) )), + Promise.all(participant_ext_records.map(async (p) => await ch.publish("amq.topic", + "participant." + p.api_id, new Buffer("stats_update")) )) + ]); } })(); |
