summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-24 16:48:03 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-24 16:48:03 +0200
commit8a1749ccee10b180a47a14de707067727df34277 (patch)
treeec4e482614b88996f5c924b756c4662d5a7d20db
parentc3ec67139713478c0ee5271929e2c6479b9dd67e (diff)
downloadbridge-8a1749ccee10b180a47a14de707067727df34277.tar.gz
bridge-8a1749ccee10b180a47a14de707067727df34277.zip
don't send grab jobs to processor…
-rw-r--r--server.js9
1 files changed, 8 insertions, 1 deletions
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");