potiuk commented on code in PR #40916:
URL: https://github.com/apache/airflow/pull/40916#discussion_r1689343734
##########
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:
@MaksYermak @kosteev @VladaZakharova -> before I merge this one, please let
me know if I correctly assessed the event behaviour. Was the intention to count
the queries made by the DAG parsing as well ? Because if it was, then I am
afraid it's not going to work. The only possibility for that would be to make
some other event (not sure if possible) that will attach such event handler to
any new session created during DAG parsing. Not crucial for this PR to get
merged, but would be great to see if this is actually ok according to
intentions.
--
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]