Is that possible to use one task in multiple flows...
# ask-community
i
Is that possible to use one task in multiple flows in order to follow "don't repeat yourself"? For example I have one task checker that will check difference of db to decide to update or not - that is used many times. So some code reuse maybe handy. Any suggestions? Some simple example, if difference_rows >0 : use task_to_update else : skip all tasks of this flow only
k
Is this 1.0 or 2.0?
i
oh yes it is 1.0
k
If it’s 1.0 you need to make that custom module available in your execution environment. If you are using Docker-based execution, then it needs to be in the image
What RunConfig are you on?
i
I am running locally
k
Check the third example here
i
So what is that?
k
You specify the working directory where you can import the common task
Copy code
flow.run_config = LocalRun(working_dir="/path/to/working-directory")