daniel-dylag-openx commented on code in PR #34021:
URL: https://github.com/apache/airflow/pull/34021#discussion_r1313359646


##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1300,9 +1300,16 @@ def _create_dag_runs_dataset_triggered(
                 )
 
     def _should_update_dag_next_dagruns(
-        self, dag: DAG, dag_model: DagModel, total_active_runs: int | None = 
None, *, session: Session
+        self, dag: DAG, dag_model: DagModel, last_dag_run: DagRun | None = 
None,

Review Comment:
   there are 3 places where this method is used:
   - when dag run is finished successfully
   - when dag run fails 
   - when new dag runs were created
   The first 2 cases are similar and we look at last dag run to make this 
decision, but in the 3rd case there is no previous dag run so I made this 
parameter optional and skip checking it if not provided



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