kaxil commented on code in PR #44433:
URL: https://github.com/apache/airflow/pull/44433#discussion_r1862845183
##########
providers/src/airflow/providers/edge/worker_api/routes/_v2_routes.py:
##########
@@ -90,6 +98,44 @@ def set_state_v2(worker_name: str, body: dict[str, Any],
session=NEW_SESSION) ->
return e.to_response() # type: ignore[attr-defined]
+@provide_session
+def job_fetch_v2(worker_name: str, body: dict[str, Any] | None = None,
session=NEW_SESSION) -> Any:
+ """Handle Edge Worker API `/edge_worker/v1/jobs/fetch/{worker_name}`
endpoint for Airflow 2.10."""
+ from flask import request
+
+ try:
+ auth = request.headers.get("Authorization", "")
+ jwt_token_authorization(request.path, auth)
+ queues = body["queues"] if body else None
Review Comment:
```py
queues = body.get("queues")
````
--
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]