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/12 16:29:00 UTC

[GitHub] [airflow] uranusjr commented on pull request #22941: Allow users to control task_ids in decorated task more

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

   It’s a nice feature but I don’t quite buy the syntax. The `hello` takes no arguments, making it magically possible to accept `task_id` does not seem to mesh well with the initial design. It would not work well with type-checking DAG files, if I understand correctly.
   
   Maybe something like this would read better?
   
   ```python
   @task
   def hello():
       print('Hello')
   
   @dag():
   def mydag2():
       for i in range(3):
           task(hello, task_id=f'welcome_message_{i}')()
   ```


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