XD-DENG commented on a change in pull request #5458: [AIRFLOW-4495] allow
externally triggered dags to run for future 'Exe…
URL: https://github.com/apache/airflow/pull/5458#discussion_r296439099
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -684,13 +684,6 @@ 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
- if run.execution_date > timezone.utcnow():
- self.log.error(
- "Execution date is in future: %s",
- run.execution_date
- )
- continue
Review comment:
This part is the scheduler code. If your DagRun's execution_date is in the
future, for sure it should not be considered for execution. This existing chunk
is behaving correctly to me, so I don't quite get the idea why you want to
remove this check.
- If you want to run a job immediately, you should give execution_date
correctly
- If you're intending to immediately execute a DagRun whose execution_date
is in the future, I suspect there is some fundamental misunderstanding.
----------------------------------------------------------------
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