Skip to content

Commit

Permalink
Fix job indexing
Browse files Browse the repository at this point in the history
Signed-off-by: Jordà Polo <jorda.polo@amd.com>
  • Loading branch information
jordap committed Feb 4, 2025
1 parent 428092d commit 0549771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ async def scan_database(address, days, step, limit, timeout):
job_index = {}
for job_id, first, last, num_nodes in results:
if job_id in job_index:
first = min(first, jobs[jobid][0])
last = max(last, jobs[jobid][1])
num_nodes = max(num_nodes, jobs[jobid][2])
first = min(first, job_index[job_id][0])
last = max(last, job_index[job_id][1])
num_nodes = max(num_nodes, job_index[job_id][2])
job_index[job_id] = (first, last, num_nodes)

# Tranform data to be used in Grafana.
Expand Down

0 comments on commit 0549771

Please sign in to comment.