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


##########
airflow/jobs/scheduler_job.py:
##########
@@ -745,6 +757,9 @@ def _execute(self) -> None:
 
             self._run_scheduler_loop()
 
+            if self.enabled_dagrun_listener:

Review Comment:
   We can just check for that in `notify_dagrun_state_changed`, and I changed 
it to just do that



##########
airflow/jobs/scheduler_job.py:
##########
@@ -1298,7 +1324,11 @@ def _schedule_dag_run(
 
         self._verify_integrity_if_dag_changed(dag_run=dag_run, session=session)
         # TODO[HA]: Rename update_state -> schedule_dag_run, ?? something else?
-        schedulable_tis, callback_to_run = 
dag_run.update_state(session=session, execute_callbacks=False)
+        schedulable_tis, callback_to_run = dag_run.update_state(
+            session=session,
+            execute_callbacks=False,
+            notification=self.notify_dagrun_state_changed if 
self.enabled_dagrun_listener else None,

Review Comment:
   Done



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