uranusjr commented on code in PR #33527:
URL: https://github.com/apache/airflow/pull/33527#discussion_r1299822604
##########
airflow/models/renderedtifields.py:
##########
@@ -201,11 +209,11 @@ def delete_old_records(
:param num_to_keep: Number of Records to keep
:param session: SqlAlchemy Session
"""
- from airflow.models.dagrun import DagRun
-
if num_to_keep <= 0:
return
+ from airflow.models.dagrun import DagRun
Review Comment:
I don’t think this actually matters, at this point it’s likely DagRun is
imported anyway and the import would be basically free. But either way works.
##########
airflow/models/renderedtifields.py:
##########
@@ -201,11 +209,11 @@ def delete_old_records(
:param num_to_keep: Number of Records to keep
:param session: SqlAlchemy Session
"""
- from airflow.models.dagrun import DagRun
-
if num_to_keep <= 0:
return
+ from airflow.models.dagrun import DagRun
Review Comment:
I don’t think this actually matters, at this point it’s likely DagRun is
imported anyway and the import would be basically free. But either way works.
--
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]