Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions airflow/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,6 @@ def _process_dags(self, dagbag, dags, tis_out):
"""
for dag in dags:
dag = dagbag.get_dag(dag.dag_id)
if dag.reached_max_runs:
self.logger.info("Not processing DAG {} since its max runs has been reached"
.format(dag.dag_id))
continue
if dag.is_paused:
self.logger.info("Not processing DAG {} since it's paused"
.format(dag.dag_id))
Expand All @@ -1088,9 +1084,14 @@ def _process_dags(self, dagbag, dags, tis_out):

self.logger.info("Processing {}".format(dag.dag_id))

dag_run = self.create_dag_run(dag)
if dag_run:
self.logger.info("Created {}".format(dag_run))
if dag.reached_max_runs:
self.logger.info("Not creating new DagRun for {} since its max runs has been reached"
.format(dag.dag_id))
else:
dag_run = self.create_dag_run(dag)
if dag_run:
self.logger.info("Created {}".format(dag_run))

self._process_task_instances(dag, tis_out)
self.manage_slas(dag)

Expand Down