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 2022/04/14 08:01:28 UTC

[GitHub] [airflow] uranusjr commented on pull request #22941: Allow re-use of decorated tasks

uranusjr commented on PR #22941:
URL: https://github.com/apache/airflow/pull/22941#issuecomment-1098821106

   The difference between the use case here and what Josh proposed is that `hello` _cannot_ be decorated.
   
   This works:
   
   ```python
   def hello(name):
       print("hello", name)
   
   task(hello, task_id="something_else")(name="is there anybody out there?")
   ```
   
   But this does not
   
   ```python
   @task  # <=== This.
   def hello(name):
       print("hello", name)
   
   task(hello, task_id="something_else")(name="is there anybody out there?")
   ```


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org