tooptoop4 commented on a change in pull request #4781: [AIRFLOW-3962] Added 
graceful handling for creation of dag_run of a dag which doesn't have any task
URL: https://github.com/apache/airflow/pull/4781#discussion_r283066476
 
 

 ##########
 File path: airflow/jobs.py
 ##########
 @@ -865,8 +865,8 @@ def create_dag_run(self, dag, session=None):
                     dag.start_date, next_run_date
                 )
 
-            # don't ever schedule in the future
-            if next_run_date > timezone.utcnow():
+            # don't ever schedule in the future or if next_run_date is None
+            if not next_run_date or next_run_date > timezone.utcnow():
 
 Review comment:
   @vardancse - next_run_date could be none for purely externally triggered 
DAGs? Wondering if this change caused 
https://jira.apache.org/jira/browse/AIRFLOW-4428

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to