mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-11-09 22:44:44 +00:00
reintroduce cutoff usage
This commit is contained in:
parent
69c6059ff8
commit
8e5fa7eace
@ -9,7 +9,7 @@ def pull_new_tba_matches(apikey, competition, cutoff):
|
|||||||
json = x.json()
|
json = x.json()
|
||||||
out = []
|
out = []
|
||||||
for i in json:
|
for i in json:
|
||||||
if i["actual_time"] != None and i["comp_level"] == "qm":
|
if i["actual_time"] != None and i["comp_level"] == "qm" and i["actual_time"]-cutoff >= 0:
|
||||||
out.append({"match" : i['match_number'], "blue" : list(map(lambda x: int(x[3:]), i['alliances']['blue']['team_keys'])), "red" : list(map(lambda x: int(x[3:]), i['alliances']['red']['team_keys'])), "winner": i["winning_alliance"]})
|
out.append({"match" : i['match_number'], "blue" : list(map(lambda x: int(x[3:]), i['alliances']['blue']['team_keys'])), "red" : list(map(lambda x: int(x[3:]), i['alliances']['red']['team_keys'])), "winner": i["winning_alliance"]})
|
||||||
out.sort(key=lambda x: x['match'])
|
out.sort(key=lambda x: x['match'])
|
||||||
return out
|
return out
|
||||||
|
@ -205,7 +205,6 @@ def main(logger, verbose, profile, debug, socket_send = None):
|
|||||||
config.resolve_config_conflicts(logger, client)
|
config.resolve_config_conflicts(logger, client)
|
||||||
|
|
||||||
config_modules, competition = config.modules, config.competition
|
config_modules, competition = config.modules, config.competition
|
||||||
clear_metrics(client, config.competition)
|
|
||||||
for m in config_modules:
|
for m in config_modules:
|
||||||
if m in modules:
|
if m in modules:
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
Loading…
Reference in New Issue
Block a user