Hi guys, I have a rather simple scenario. I have a...
# ask-community
k
Hi guys, I have a rather simple scenario. I have a list of job that I want to them all be a flow and then want to deploy them all. So it’s something like this.
Copy code
import job_wrapper
job_list = ["job_a","job_b",...]
for job in job_list:
    @flow(name=job)
    def run_job():
        job_wrapper(job)
However, because that current deployment requires a unique entry_point function as well flow_name, now what i have is
Copy code
import job_wrapper
@flow(name="job_a")
def run_job_a():
    job_wrapper("job_a")
@flow(name="job_b")
def run_job_b():
    job_wrapper("job_b")
...
Is there a less repetitive way of doing this that I might have missed
d
There are multiple approaches for this. 1. You can write a deployemt script and use different default parameter for each deployment. 2. Use subflows.
k
I ended up using the first approach but still strugle to pass in a flow_name for each flow as parameter because the current deployment cli doesn’t take flow name as an option.
Also so keen to know how to use subflow. Could you elabrate on this a bit @Deceivious
d
U can give names with with_options method
Or overwrite the names