From a89cd6b0bfd53ee7655bfe887f3ebf08067c39aa Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 14 Jun 2017 12:48:21 +0200 Subject: send match_pending to player.name --- worker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worker.js b/worker.js index d6befcb..0c67b84 100644 --- a/worker.js +++ b/worker.js @@ -72,13 +72,16 @@ if (LOGGLY_TOKEN) const data = await Promise.each(await api.requests(where, payload.region, payload.params, logger), async (data, idx, len) => { - if (where == "matches") // send match structure + if (where == "matches") { // send match structure await ch.sendToQueue(PROCESS_QUEUE, new Buffer(JSON.stringify(data)), { persistent: true, type: "match", headers: idx == len - 1? { notify: notify } : {} }); // forward "notify" for the last match on the last page + if (notify) await ch.publish("amq.topic", notify, + new Buffer("match_pending")); + } if (where == "samples") // forward to sampler await ch.sendToQueue(SAMPLE_QUEUE, -- cgit v1.3.1