Hi folks, can I have nested tasks? ```@task def f1...
# ask-community
j
Hi folks, can I have nested tasks?
Copy code
@task
def f1():
  ...
@task
def f2():
  f1()
  ...
k
Hey @Jean Da Rolt, you can if you do
f1.run()
which will use the Python function underneath but it won’t be treated as a tasks with retry logic and stuff
j
thanks
z
You can also have a function that calls a bunch of tasks if you just want to organize them but retain the visibility in the UI and retries e.g.
Copy code
@task
def task1():
  ...

@task
def task2():
   ...

def useful_to_group_in_code():
    task1()
    task2()

with Flow(...) as flow:
    useful_to_group_in_code()
❤️ 1