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
Zanie
06/08/2023, 10:41 PM
Definitely!
Zanie
06/08/2023, 10:42 PM
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
Jacob Bedard
06/08/2023, 10:46 PM
Ok, good to know! I'll give this a try.
Thanks!
Jacob Bedard
06/09/2023, 7:16 PM
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?
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.