asaf alina
09/17/2022, 1:21 PMmain
flow, which calls to a subflow go_eat
, each time with different parameters.
something of the sort:
@flow
def go_eat():
...
@flow
def main():
animals = ['dog', 'cat', 'monkey']
for animal in animals:
go_eat(animal)
I want to make those go_eat
flows to run in parallel, and I wonder how to implement this.
it would be best if I could make up to 2 animals to go_eat
in parallel, but no more than that.
I'm not sure if I somehow better use the prefect queue concurrency mechanism, or if I better implement this in pure python.
any suggestions?Marcelo Santoro
09/17/2022, 1:39 PMTaylor Curran
09/17/2022, 2:55 PMAnna Geller
09/17/2022, 5:03 PM