summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'worker.js')
-rw-r--r--worker.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/worker.js b/worker.js
index f5531d8..281ca1b 100644
--- a/worker.js
+++ b/worker.js
@@ -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;
}
});