From 9344a785f3969ad03335cd04237cf4856a3ada39 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 24 Jun 2017 16:45:33 +0200 Subject: fix region grabbing start&end --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 5db90d6..013eee6 100644 --- a/server.js +++ b/server.js @@ -239,7 +239,9 @@ async function grabPlayers(names, region, grabstart, category) { // request grab jobs for a region's matches async function grabMatches(region, last_match_created_date) { - last_match_created_date = last_match_created_date || new Date(0); + last_match_created_date = last_match_created_date + || new Date(Date.parse(defaultGrabstartForCategory("tournament"))); + const now = new Date(); // add 1s, because createdAt-start <= x <= createdAt-end // so without the +1s, we'd always get the last_match_created_date match back -- cgit v1.3.1