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 2020/11/12 13:20:51 UTC

[GitHub] [airflow] ashb commented on a change in pull request #12184: Create DAG-level cluster policy

ashb commented on a change in pull request #12184:
URL: https://github.com/apache/airflow/pull/12184#discussion_r522098413



##########
File path: airflow/models/dagbag.py
##########
@@ -47,6 +47,16 @@
 from airflow.utils.session import provide_session
 from airflow.utils.timeout import timeout
 
+# TODO: Remove once deprecated
+if hasattr(settings, "policy"):
+    warnings.warn(
+        "Using `policy` in airflow_local_settings.py is deprecated. "
+        "Please rename your `policy` to `task_policy`.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    setattr(settings, "task_policy", settings.policy)  # pylint: disable=no-member

Review comment:
       This should be done in `airflow.settings.import_local_settings` function please.




----------------------------------------------------------------
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:
users@infra.apache.org