You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/09 16:08:06 UTC
[GitHub] [airflow] dstandish commented on a diff in pull request #24114: Refactor `DagRun.verify_integrity`
dstandish commented on code in PR #24114:
URL: https://github.com/apache/airflow/pull/24114#discussion_r893699388
##########
airflow/models/dagrun.py:
##########
@@ -885,19 +924,21 @@ def verify_integrity(self, session: Session = NEW_SESSION):
)
ti.state = State.REMOVED
...
+ return task_ids
- def task_filter(task: "Operator") -> bool:
- return task.task_id not in task_ids and (
- self.is_backfill
- or task.start_date <= self.execution_date
- and (task.end_date is None or self.execution_date <= task.end_date)
- )
+ def _get_task_creator(
+ self, created_counts: Dict[str, int], ti_mutation_hook: Callable, hook_is_noop: bool
+ ) -> Callable:
+ """
+ Get the task creator function.
- created_counts: Dict[str, int] = defaultdict(int)
+ This function also updates the created_counts dictionary with the number of tasks created.
- # Set for the empty default in airflow.settings -- if it's not set this means it has been changed
- hook_is_noop = getattr(task_instance_mutation_hook, 'is_noop', False)
+ :created_counts: Dictionary of task_type -> count of created TIs
+ :ti_mutation_hook: task_instance_mutation_hook function
+ :hook_is_noop: Whether the task_instance_mutation_hook is a noop
Review Comment:
```suggestion
:param created_counts: Dictionary of task_type -> count of created TIs
:param ti_mutation_hook: task_instance_mutation_hook function
:param hook_is_noop: Whether the task_instance_mutation_hook is a noop
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org