OmairK commented on a change in pull request #9097:
URL: https://github.com/apache/airflow/pull/9097#discussion_r435840776
##########
File path: airflow/api_connexion/endpoints/pool_endpoint.py
##########
@@ -26,18 +30,33 @@ def delete_pool():
raise NotImplementedError("Not implemented yet.")
-def get_pool():
+@provide_session
+def get_pool(pool_name, session):
"""
Get a pool
"""
- raise NotImplementedError("Not implemented yet.")
+ pool_id = pool_name
+ query = session.query(Pool)
+ pool = query.filter(Pool.pool == pool_id).one_or_none()
+
+ if pool is None:
+ raise NotFound("Pool not found")
+ return pool_schema.dump(pool)
-def get_pools():
+@provide_session
+def get_pools(session):
"""
Get all pools
"""
- raise NotImplementedError("Not implemented yet.")
+ offset = request.args.get(parameters.page_offset, 0)
+ limit = min(request.args.get(parameters.page_limit, 100), 100)
Review comment:
Thanks
Here is the change `983e673`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]