Skip to content

Commit

Permalink
Faster results API
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Nov 3, 2024
1 parent 5f4b8c9 commit e2af5ee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,13 @@ async def api_results(request):

for repo in repos:

# latest_result_path = yunorunner_dir + f"/results/logs/{repo.name}_{app.config.ARCH}_{app.config.YNH_BRANCH}_results.json"
# if not os.path.exists(latest_result_path):
# continue
# all_results[repo.name] = json.load(open(latest_result_path))
latest_result_path = yunorunner_dir + f"/results/logs/{repo.name}_{app.config.ARCH}_{app.config.YNH_BRANCH}_results.json"
if not os.path.exists(latest_result_path):
continue
all_results[repo.name] = json.load(open(latest_result_path))

continue
# Keeping old code for reference

jobs = (
Job.select()
Expand Down

0 comments on commit e2af5ee

Please sign in to comment.