mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-28 10:39:09 +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()
|
||||
out = []
|
||||
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.sort(key=lambda x: x['match'])
|
||||
return out
|
||||
@ -17,8 +17,8 @@ def pull_new_tba_matches(apikey, competition, cutoff):
|
||||
def pull_new_tba_matches_manual(apikey, competition, cutoff):
|
||||
filename = competition+"-wins.json"
|
||||
with open(filename, 'r') as f:
|
||||
data = json.load(f)
|
||||
return data
|
||||
data = json.load(f)
|
||||
return data
|
||||
|
||||
def get_team_match_data(client, competition, team_num):
|
||||
db = client.data_scouting
|
||||
|
@ -205,7 +205,6 @@ def main(logger, verbose, profile, debug, socket_send = None):
|
||||
config.resolve_config_conflicts(logger, client)
|
||||
|
||||
config_modules, competition = config.modules, config.competition
|
||||
clear_metrics(client, config.competition)
|
||||
for m in config_modules:
|
||||
if m in modules:
|
||||
start = time.time()
|
||||
|
Loading…
Reference in New Issue
Block a user