diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-14 12:48:21 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-14 12:48:21 +0200 |
| commit | a89cd6b0bfd53ee7655bfe887f3ebf08067c39aa (patch) | |
| tree | 4f6a1a2c05db5c65a2eeb6c619471669b1a94b96 | |
| parent | 720c680c0902fcc3a3c56457120416a7893480d9 (diff) | |
| download | apigrabber-a89cd6b0bfd53ee7655bfe887f3ebf08067c39aa.tar.gz apigrabber-a89cd6b0bfd53ee7655bfe887f3ebf08067c39aa.zip | |
send match_pending to player.name
| -rw-r--r-- | worker.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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, |
