diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-24 16:48:03 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-24 16:48:03 +0200 |
| commit | 8a1749ccee10b180a47a14de707067727df34277 (patch) | |
| tree | ec4e482614b88996f5c924b756c4662d5a7d20db | |
| parent | c3ec67139713478c0ee5271929e2c6479b9dd67e (diff) | |
| download | bridge-8a1749ccee10b180a47a14de707067727df34277.tar.gz bridge-8a1749ccee10b180a47a14de707067727df34277.zip | |
don't send grab jobs to processor…
| -rw-r--r-- | server.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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"); |
