turbaszek commented on a change in pull request #12184:
URL: https://github.com/apache/airflow/pull/12184#discussion_r519465132
##########
File path: airflow/models/dagbag.py
##########
@@ -383,8 +383,11 @@ def bag_dag(self, dag, root_dag):
dag.resolve_template_files()
dag.last_loaded = timezone.utcnow()
+ # Check policies
+ settings.dag_policy(dag)
+
for task in dag.tasks:
- settings.policy(task)
+ settings.task_policy(task)
Review comment:
Done, this is what users will see:
```
root@817b1471dabe:/opt/airflow# airflow scheduler
/opt/airflow/airflow/models/dag.py:61: DeprecationWarning: Using `policy` in
airflow_local_settings.py is deprecated. Please rename your `policy` to
`task_policy`.
from airflow.models.dagbag import DagBag
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
[2020-11-08 19:09:09,005] {scheduler_job.py:1248} INFO - Starting the
scheduler
[2020-11-08 19:09:09,005] {scheduler_job.py:1253} INFO - Processing each
file at most -1 times
[2020-11-08 19:09:09,114] {scheduler_job.py:1275} INFO - Resetting orphaned
tasks for active dag runs
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]