ashb commented on code in PR #44972:
URL: https://github.com/apache/airflow/pull/44972#discussion_r1887707456
##########
airflow/dag_processing/manager.py:
##########
@@ -1183,26 +1015,22 @@ def _add_paths_to_queue(self, file_paths_to_enqueue:
list[str], add_at_front: bo
def max_runs_reached(self):
""":return: whether all file paths have been processed max_runs
times."""
- if self._max_runs == -1: # Unlimited runs.
+ if self.max_runs == -1: # Unlimited runs.
return False
- for stat in self._file_stats.values():
- if stat.run_count < self._max_runs:
- return False
- if self._num_run < self._max_runs:
+ if self._num_run < self.max_runs:
return False
- return True
+ return all(stat.run_count >= self.max_runs for stat in
self._file_stats.values())
Review Comment:
This moves the condition from the run_parsing_loop into here.
--
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]