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/01/14 07:23:26 UTC

[GitHub] [airflow] uranusjr commented on issue #19902: DuplicateTaskIdFound when reusing tasks with task_group decorator

uranusjr commented on issue #19902:
URL: https://github.com/apache/airflow/issues/19902#issuecomment-1012840620


   Yeah, this is a known problem (well, I know it, at least) with `@task`, you need to instead do something like
   
   ```python
   @task_group
   def do_all_things():
       for i in range(5):
           @task(task_id=f"do_thing_{i}")
           def do_thing(i):
               print(i)
    
           do_thing(i)
   ```
   
   instead. But it’s unfortunately not very easy to fix.


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