You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/06/22 18:30:49 UTC
[airflow] 03/05: Enhanced documentation around Cluster Policy
(#8661)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 3127b0a071c66ec0d53adaef055c9cf4bdcd1fe4
Author: Vardan Gupta <va...@gmail.com>
AuthorDate: Sat May 2 01:49:53 2020 +0530
Enhanced documentation around Cluster Policy (#8661)
(cherry picked from commit 6560f29fa206fe1fcc99d0ee4093d678caf74511)
---
docs/concepts.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/concepts.rst b/docs/concepts.rst
index 068321e..89479d4 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -1017,6 +1017,13 @@ may look like inside your ``airflow_local_settings.py``:
if task.timeout > timedelta(hours=48):
task.timeout = timedelta(hours=48)
+To define policy, add a ``airflow_local_settings`` module to your PYTHONPATH
+or to AIRFLOW_HOME/config folder that defines this ``policy`` function. It receives a ``TaskInstance``
+object and can alter it where needed.
+
+Please note, cluster policy currently applies to task only though you can access DAG via ``task.dag`` property.
+Also, cluster policy will have precedence over task attributes defined in DAG
+meaning if ``task.sla`` is defined in dag and also mutated via cluster policy then later will have precedence.
Documentation & Notes
=====================