uranusjr commented on code in PR #30392:
URL: https://github.com/apache/airflow/pull/30392#discussion_r1156428461
##########
airflow/models/dagbag.py:
##########
@@ -201,18 +202,22 @@ def get_dag(self, dag_id, session: Session = None):
dag_id in self.dags_last_fetched
and timezone.utcnow() > self.dags_last_fetched[dag_id] +
min_serialized_dag_fetch_secs
):
+ sd_latest_version =
SerializedDagModel.get_latest_version_hash(dag_id=dag_id, session=session)
Review Comment:
Should (can) we cache this? One additional db query per call seems pretty
significant.
Or maybe this can be merged with `get_last_updated_datetime` below.
--
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]