You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/31 22:01:36 UTC

[GitHub] [airflow] hhmahmood opened a new issue, #27425: get_dags does not fetch more than 100 dags.

hhmahmood opened a new issue, #27425:
URL: https://github.com/apache/airflow/issues/27425

   Hi,
   
   The function does not return more than 100 dags even setting the limit to more than 100. So `get_dags(limit=500)` will only return max of 100 dags.
   
   I have to do the hack to mitigate this problem.
   ```
       def _get_dags(self, max_dags: int = 500):
           i = 0
           responses = []
           while i <= max_dags:
               response = self._api.get_dags(offset=i)
               responses += response['dags']
               i = i + 100
           return [dag['dag_id'] for dag in responses]
   ```
   Versions I am using are:
   ```
   apache-airflow==2.3.2
   apache-airflow-client==2.3.0
   ```
   and
   ```
   apache-airflow==2.2.2
   apache-airflow-client==2.1.0
   ```
   
   Best,
   Hamid


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk closed issue #27425: get_dags does not fetch more than 100 dags.

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #27425: get_dags does not fetch more than 100 dags.  
URL: https://github.com/apache/airflow/issues/27425


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on issue #27425: get_dags does not fetch more than 100 dags.

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #27425:
URL: https://github.com/apache/airflow/issues/27425#issuecomment-1297739634

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org