phanikumv commented on code in PR #32645:
URL: https://github.com/apache/airflow/pull/32645#discussion_r1268126160
##########
airflow/models/serialized_dag.py:
##########
@@ -142,23 +142,21 @@ def write_dag(
# If Yes, does nothing
# If No or the DAG does not exists, updates / writes Serialized DAG to
DB
if min_update_interval is not None:
- if (
- session.query(literal(True))
- .filter(
+ if session.scalar(
+ select(literal(True)).where(
and_(
cls.dag_id == dag.dag_id,
(timezone.utcnow() -
timedelta(seconds=min_update_interval)) < cls.last_updated,
)
Review Comment:
done
--
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]