Prab-27 commented on code in PR #74540:
URL: https://github.com/apache/airflow/pull/74540#discussion_r4668113776
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_state_store.py:
##########
@@ -122,14 +127,14 @@ def _resolve_asset_id_by_uri(uri: str, session:
SessionDep) -> int:
@router.get("/by-name/value")
-def get_asset_state_store_by_name(
+async def get_asset_state_store_by_name(
name: Annotated[str, Query(min_length=1)],
key: Annotated[str, Query(min_length=1)],
- session: SessionDep,
+ session: AsyncSessionDep,
) -> AssetStateStoreResponse:
"""Get an asset state store value by asset name."""
- asset_id = _resolve_asset_id_by_name(name, session)
- value = get_state_backend().get(AssetScope(asset_id=asset_id), key,
session=session)
+ asset_id = await _resolve_asset_id_by_name(name, session)
+ value = await get_state_backend().aget(AssetScope(asset_id=asset_id), key,
session=session)
Review Comment:
@Dev-iL , Got it!
Apologies for the delay - I'll work on these updates and aim to wrap them up
in a couple of days
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]