Skip to content

Commit

Permalink
fixup! Update airflow/models/dag.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Feb 28, 2022
1 parent 7ce123b commit ec3fea6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2631,8 +2631,12 @@ def validate_schedule_and_params(self):
)

@provide_session
def validate_task_pools(self, session=NEW_SESSION):
"""Validates and raise exception if any task in a dag is using a non-existent pool"""
def validate_task_pools(self, session: Session = NEW_SESSION):
"""
Validates and raise exception if any task in a dag is using a non-existent pool
:meta private:
"""
from airflow.models.pool import Pool

pools = {p.pool for p in Pool.get_pools(session)}
Expand Down

0 comments on commit ec3fea6

Please sign in to comment.