mobuchowski commented on code in PR #48049:
URL: https://github.com/apache/airflow/pull/48049#discussion_r2007454373


##########
providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:
##########
@@ -69,15 +69,16 @@ def _get_try_number_success(val):
 
 def _executor_initializer():
     """
-    Initialize worker processes for the executor used for DagRun listener.
+    Initialize processes for the executor used with DAGRun listener's methods 
(on scheduler).
 
     This function must be picklable, so it cannot be defined as an inner 
method or local function.
 
     Reconfigures the ORM engine to prevent issues that arise when multiple 
processes interact with
     the Airflow database.
     """
-    if not AIRFLOW_V_3_0_PLUS:
-        settings.configure_orm()
+    # This initializer is used only on the scheduler
+    # We can configure_orm regardless of the Airflow version, as DB access is 
always allowed from scheduler.
+    settings.configure_orm()

Review Comment:
   @kacpermuda maybe splitting those logically into two listeners now would be 
a good idea? Those won't share as much logic now. Maybe after Airflow 2 goes 
out of provider scope?



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