Skip to content

Commit

Permalink
Add job_options argument to `OpenEoBackendImplementation.request_co…
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed May 2, 2024
1 parent f0365c0 commit 4903fbd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ and start a new "In Progress" section above it.

## In progress

## 0.98.0

- Add `job_options` argument to `OpenEoBackendImplementation.request_costs()` API.
It's optional and unused for now, but allows openeo-geopyspark-driver to adapt already.
(related to [Open-EO/openeo-geopyspark-driver#531](https://github.com/Open-EO/openeo-geopyspark-driver/issues/531))

## 0.97.0

- Remove deprecated and now unused `user_id` argument from `OpenEoBackendImplementation.request_costs()`
Expand Down
2 changes: 1 addition & 1 deletion openeo_driver/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.97.0a1"
__version__ = "0.98.0a1"
11 changes: 9 additions & 2 deletions openeo_driver/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,11 +786,18 @@ def set_request_id(self, request_id: str):
def after_request(self, request_id: str):
pass

def request_costs(self, *, user: User, request_id: str, success: bool) -> Optional[float]:
def request_costs(
self,
*,
user: User,
job_options: Union[dict, None] = None,
request_id: str,
success: bool,
) -> Optional[float]:
"""
Report resource usage of (current) synchronous processing request and get associated cost.
:param user: user object
:param user_id: (deprecated) user id
:param job_options: job options (if any provided in the sync processing request)
"""
return None

0 comments on commit 4903fbd

Please sign in to comment.