Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional job tracker metadata #141

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Added support for `FetchType.POINT` in Sentinel-1 orbit state selection
- Added CPU, max-executor-memory and duration metadata in job tracker
### Changed

### Removed
Expand Down
11 changes: 11 additions & 0 deletions src/openeo_gfmap/manager/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ def _update_statuses(self, df: pd.DataFrame):
future.add_done_callback(partial(done_callback, df=df, idx=idx))
self._futures.append(future)
df.loc[idx, "costs"] = job_metadata["costs"]
df.loc[idx, "memory"] = (
job_metadata["usage"]
.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)
)

# Case in which it failed
if (df.loc[idx, "status"] != "error") and (
Expand Down
Loading