From 8a1749ccee10b180a47a14de707067727df34277 Mon Sep 17 00:00:00 2001 From: schneefux Date: Mon, 24 Apr 2017 16:48:03 +0200 Subject: don't send grab jobs to processor… MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index fe2e5bb..8788802 100644 --- a/server.js +++ b/server.js @@ -84,7 +84,7 @@ function grabPlayer(name, region, last_match_created_date, id, gameModes) { logger.info("requesting update", { name: name, region: region }); // TODO make this more dynamic - const queue = (gameModes == "brawl") ? "process_brawl" : "process"; + const queue = (gameModes == "brawl") ? "grab_brawl" : "grab"; return ch.sendToQueue(queue, new Buffer(JSON.stringify(payload)), { persistent: true, type: "matches", @@ -310,6 +310,13 @@ app.post("/api/samples", async (req, res) => { updateSamples(region)); res.sendStatus(204); }); +// download Telemetry +app.post("/api/match/:match/telemetry", async (req, res) => { + logger.info("requesting download for Telemetry", { api_id: req.params.api_id }); + await ch.sendToQueue("grab", new Buffer(req.params.api_id), + { persistent: true, type: "telemetry" }); + res.sendStatus(204); +}); // crunch global stats app.post("/api/crunch", async (req, res) => { logger.info("crunching global stats"); -- cgit v1.3.1