Skip to content

Commit

Permalink
get cpu and duration from job metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentVerelst committed Dec 2, 2024
1 parent 6386a43 commit 7b9eec9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/openeo_gfmap/manager/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,20 @@ def _update_statuses(self, df: pd.DataFrame):
.get("max_executor_memory", {})
.get("value", None)
)
df.loc[idx, "cpu"] = (
job_metadata["usage"]
.get("cpu", {})
.get("value", None)
)
df.loc[idx, "duration"] = (
job_metadata["usage"]
.get("duration", {})
.get("value", None)
)

else:
_log.warning(
"Costs not found in job %s metadata. Costs will be set to 'None'.",
"Costs not found in job %s metadata. Costs, memory, cpu and duration will be set to 'None'.",
job.job_id,
)

Expand Down

0 comments on commit 7b9eec9

Please sign in to comment.