vincbeck commented on code in PR #40916: URL: https://github.com/apache/airflow/pull/40916#discussion_r1688533810
########## airflow/dag_processing/processor.py: ########## @@ -837,13 +877,17 @@ def process_file( :return: number of dags found, count of import errors, last number of db queries """ self.log.info("Processing file %s for tasks to queue", file_path) + try: + if InternalApiConfig.get_use_internal_api(): + dagbag = DagFileProcessor._get_dagbag(file_path) + else: + with create_session() as session: Review Comment: Makes sense to me. Thanks for sharing the details. I like the context manager solution -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org