diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-13 12:36:32 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-13 12:36:32 +0200 |
| commit | 9b67d1072d7764c163a4c8512f576eeb47964d5d (patch) | |
| tree | 413858120ad2dce693928e01beea7c166d03cf60 | |
| parent | 8fc543cd4773965a231b8b00e80730f5130fedd4 (diff) | |
| download | processor-9b67d1072d7764c163a4c8512f576eeb47964d5d.tar.gz processor-9b67d1072d7764c163a4c8512f576eeb47964d5d.zip | |
fix stats_update notification
| -rw-r--r-- | worker.js | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -262,11 +262,9 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // notify web await Promise.map(msgs, async (m) => { if (m.properties.headers.notify == undefined) return; - let notif = ""; switch (m.properties.type) { // new match case "match": - notif = "matches_update"; // notify player.name.api_id about match_update await Promise.map(match_objects, async (mat) => await ch.publish("amq.topic", @@ -278,7 +276,8 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { break; case "player": // player obj updated - notif = "stats_update"; + await ch.publish("amq.topic", m.properties.headers.notify, + new Buffer("stats_update")); break; } }); |
