uranusjr commented on code in PR #45175:
URL: https://github.com/apache/airflow/pull/45175#discussion_r1897136172


##########
airflow/timetables/simple.py:
##########
@@ -137,14 +137,18 @@ def next_dagrun_info(
     ) -> DagRunInfo | None:
         if restriction.earliest is None:  # No start date, won't run.
             return None
+
+        current_time = timezone.coerce_datetime(timezone.utcnow())
+
         if last_automated_data_interval is not None:  # has already run once
             start = last_automated_data_interval.end
-            end = timezone.coerce_datetime(timezone.utcnow())
+            end = current_time
+
+            if start > end:  # Skip scheduling if the last run ended in the 
future
+                return None

Review Comment:
   Is returning None the right thing to do here? It would make this DAG _not 
run at all_ in the future, even after the previous run is no longer in the 
future.



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