yuqian90 commented on a change in pull request #7038: [AIRFLOW-4495] allow 
externally triggered dags to run for future exec dates
URL: https://github.com/apache/airflow/pull/7038#discussion_r363565941
 
 

 ##########
 File path: airflow/jobs/scheduler_job.py
 ##########
 @@ -629,13 +629,18 @@ def _process_task_instances(self, dag, 
task_instances_list, session=None):
         active_dag_runs = []
         for run in dag_runs:
             self.log.info("Examining DAG run %s", run)
-            # don't consider runs that are executed in the future
+            # don't consider runs that are executed in the future unless
+            # specified by config and schedule_interval is None
             if run.execution_date > timezone.utcnow():
-                self.log.error(
-                    "Execution date is in future: %s",
-                    run.execution_date
-                )
-                continue
+                if run.dag.schedule_interval or not conf.getboolean(
 
 Review comment:
   This can now be:
   
   ```python
               if run.execution_date > timezone.utcnow() and not 
run.dag.allow_future_exec_dates:
                       self.log.error(
                           "Execution date is in future: %s",
                           run.execution_date
                       )
                       continue
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to