dstandish commented on code in PR #49097:
URL: https://github.com/apache/airflow/pull/49097#discussion_r2042295397
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -102,6 +102,55 @@
""":meta private:"""
+class SchedulerDagBag:
+ """
+ Internal class for retrieving and caching dags in the scheduler.
+
+ :meta private:
+ """
+
+ def __init__(self):
+ self._dags: dict[str, DAG] = {} # dag_version_id to dag
+
+ def _get_dag(self, version_id: str, session: Session) -> DAG | None:
+ if dag := self._dags.get(version_id):
+ return dag
+ dag_version = session.get(DagVersion, version_id)
+ if not dag_version:
+ return None
+ serdag = dag_version.serialized_dag
Review Comment:
i added joinedload as an option here
--
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]