Hi guys. Is it possible to run tasks from a flow o...
# prefect-community
s
Hi guys. Is it possible to run tasks from a flow on different specialised agents?
n
Hi @sebastian.clanzett - unfortunately at this time we don't have a way to configure per-task execution environments. This is something that we're looking into in the future so that may change. Minor side note: agents aren't responsible for running your flows/tasks but instead are responsible for orchestrating your flow/task runs for execution. You can read more about how agents fit into the broader infrastructure here: https://docs.prefect.io/orchestration/agents/overview.html
s
Thx. Is there a way to connect two different flows?
n
There isn't a way to do that in a "formal" way, such that you'll be able to see all the tasks for connected flows, BUT you can use the
FlowRunTask
from the task library to easily kick off runs of different flows as tasks in another; using the
wait
kwarg allows you to pass the created run's state to the task that originally created it, which will let you handle it something like a subflow/connected flow. You can read more about that here: https://docs.prefect.io/api/latest/tasks/prefect.html#flowruntask
s
Thank you very much. I will look into it! 👍
n
Happy to help! 🙂