ashb commented on code in PR #27030:
URL: https://github.com/apache/airflow/pull/27030#discussion_r994568455


##########
airflow/utils/db.py:
##########
@@ -831,8 +831,8 @@ def reserialize_dags(*, session: Session = NEW_SESSION) -> 
None:
     from airflow.models.serialized_dag import SerializedDagModel
 
     session.query(SerializedDagModel).delete(synchronize_session=False)
-    dagbag = DagBag()
-    dagbag.collect_dags(only_if_updated=False, safe_mode=False)
+    dagbag = DagBag(collect_dags=False)
+    dagbag.collect_dags(only_if_updated=False, 
safe_mode=conf.getboolean('core', 'DAG_DISCOVERY_SAFE_MODE'))

Review Comment:
   Simpler: don't pass it and use the default.
   ```suggestion
       dagbag.collect_dags(only_if_updated=False)
   ```



-- 
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]

Reply via email to