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/06/05 11:02:02 UTC

[GitHub] [airflow] ashb commented on a change in pull request #8852: Add task instance mutation hook

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



##########
File path: airflow/settings.py
##########
@@ -79,18 +84,13 @@
 json = json
 
 
-def policy(task):
+def policy(task: 'BaseOperator'):
     """
-    This policy setting allows altering tasks right before they
-    are executed. It allows administrator to rewire some task parameters.
-
-    Note that the ``Task`` object has a reference to the DAG
-    object. So you can use the attributes of all of these to define your
-    policy.
+    This policy setting allows altering tasks after they are loaded in
+    the DagBag. It allows administrator to rewire some task parameters.
 
     To define policy, add a ``airflow_local_settings`` module
-    to your PYTHONPATH that defines this ``policy`` function. It receives
-    a ``Task`` object and can alter it where needed.

Review comment:
       Did you mean to remove these doc  comments? This bit seems appropriate still.




----------------------------------------------------------------
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