Let's say I want to use `run_deployment()` in a fl...
# prefect-community
k
Let's say I want to use
run_deployment()
in a flow, and I want to run multiple deployments concurrently, then move on to the next task once all the deployments have finished running. How might I do that?
1
I tried using
anyio.create_task_group()
but when I provide the positional args to
run_deployment
in the call to
start_soon()
I get:
Copy code
TypeError: run_deployment() got multiple values for argument 'client'
So I'm guessing that's probably not the way to do it.
z
Hm that should work, sounds like a bug or an unexpected calling pattern. Can you share an example?
You can use functools.partial to work around anyio not accepting keyword arguments, btw.
(A task group is indeed the correct pattern here, btw)
k
Was considering using functools.partial. Give me a moment to try it, and if it doesn't work, I'll share the code.
z
We automatically inject the client as a kwarg and if provided positionally it'll break.
k
of course! that was the fix
❤️