summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-08-16 19:24:44 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-08-16 19:24:44 +0200
commitf5258c495d489ba1ea7fef8f30a671f2e21bc453 (patch)
tree01713a025f9c83d5b157100a21aa73471cb54b1f
parent54771200750c08cde38bb28dcb5b897eb91395bd (diff)
downloadbridge-f5258c495d489ba1ea7fef8f30a671f2e21bc453.tar.gz
bridge-f5258c495d489ba1ea7fef8f30a671f2e21bc453.zip
support lmcd on all dbs, add brawl player queue
-rw-r--r--service_grab.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/service_grab.js b/service_grab.js
index cca8f30..3de9601 100644
--- a/service_grab.js
+++ b/service_grab.js
@@ -10,6 +10,7 @@ const api = require("../orm/api"),
const GRABSTART = process.env.GRABSTART || "2017-02-14T00:00:00Z",
BRAWL_RETENTION_DAYS = parseInt(process.env.BRAWL_RETENTION_DAYS) || 3,
PLAYER_PROCESS_QUEUE = process.env.PLAYER_PROCESS_QUEUE || "process",
+ PLAYER_BRAWL_PROCESS_QUEUE = process.env.PLAYER_PROCESS_QUEUE || "process_brawl",
PLAYER_TOURNAMENT_PROCESS_QUEUE = process.env.PLAYER_TOURNAMENT_PROCESS_QUEUE || "process_tournament",
GRAB_QUEUE = process.env.GRAB_QUEUE || "grab",
GRAB_BRAWL_QUEUE = process.env.GRAB_BRAWL_QUEUE || "grab_brawl",
@@ -25,11 +26,13 @@ module.exports = class Analyzer extends Service {
constructor() {
super();
+ // TODO support multiple targets
this.setTargets({
"regular": GRAB_QUEUE,
"brawl": GRAB_BRAWL_QUEUE,
"tournament": GRAB_TOURNAMENT_QUEUE,
"regular_player": PLAYER_PROCESS_QUEUE,
+ "brawl_player": PLAYER_BRAWL_PROCESS_QUEUE,
"tournament_player": PLAYER_TOURNAMENT_PROCESS_QUEUE
});
@@ -278,8 +281,7 @@ module.exports = class Analyzer extends Service {
// set last_update and request an update job
// if last_update is null, we need that player's full history
let grabstart;
- if (player.get("last_update") != null && category == "regular")
- // TODO do not fetch everything on category tournament / brawl
+ if (player.get("last_update") != null)
grabstart = player.last_match_created_date;
if (grabstart == undefined) grabstart = this.getGrabstart(category);
else