Probably a dumb question, but want to ask before I...
# ask-community
j
Probably a dumb question, but want to ask before I go all the way to trying it out with a deployment: Can a task make use of a non-task function in the same file? I think my tasks will be a lot easier to read and maintain if I don't have to have too much going on all in one function. For example:
Copy code
def little_function(thing):
  print(thing)

@task(name='big function')
def big_function(list_of_things):
  for thing in list_of_things:
    little_function(thing)
1
z
Definitely!
The only place you’ll run into problems with this kind of thing is with a remote task runner like Dask or Ray. In those cases, you may have problems depending on how you configure the workers and where the function is. I think even then though, you’re very unlikely to have problems with functions in the same file.
j
Ok, good to know! I'll give this a try. Thanks!
One more question - is there a recursion limit to flows? i.e. Can I technically put a flow inside a flow inside a flow.... ad infinitum?
z
We don’t enforce a limit afaik.
🙏 1