uranusjr commented on a change in pull request #20722:
URL: https://github.com/apache/airflow/pull/20722#discussion_r780134034
##########
File path: airflow/models/dagrun.py
##########
@@ -804,18 +806,42 @@ def verify_integrity(self, session: Session =
NEW_SESSION):
ti.state = State.NONE
session.merge(ti)
- # check for missing tasks
- for task in dag.task_dict.values():
- if task.start_date > self.execution_date and not self.is_backfill:
- continue
+ def task_filter(task: "BaseOperator"):
+ return task.task_id not in task_ids and (
+ self.is_backfill or task.start_date <= self.execution_date
+ )
+
+ created_counts: Dict[str, int] = Counter()
Review comment:
If Counter is slower (or comparable) I’d just use defaultdict. Counter
is cool, but generally does not produce better code, from my experience, and
this is no exception.
--
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]