fat-catTW commented on code in PR #76909:
URL: https://github.com/apache/airflow/pull/76909#discussion_r4551621678


##########
airflow-core/src/airflow/settings.py:
##########
@@ -913,6 +923,25 @@ def initialize():
 
     # Ensure we close DB connections at scheduler and gunicorn worker 
terminations
     atexit.register(dispose_orm)
+    _initialized = True
+    _initialized_without_orm = not orm

Review Comment:
   Thanks for the PR.
   `orm=True` does not always configure ORM. re-exec and virtualenv workers 
skip `configure_orm()`. This still records `_initialized_without_orm = False`, 
so a later `ensure_initialized()` incorrectly treats ORM as available.
   
   Maybe we could make this flag reflect whether `configure_orm()` actually ran?
   



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