Hey guys, today’s Q&A session - is there such ...
# prefect-community
d
Hey guys, today’s Q&A session - is there such a concept as picking a runtime execution environemnt during a flow? To be more descriptive… • I run task A, provides some output X • X is provided as input to Task B, and based off say a number of available executors, N, running on Fargate I map/partition the data and designate Task B to run with partition X/N of the data, and on an environment or worker that I specify during execution?
j
Hi @Darragh, at this time the Prefect-managed execution environments are constant for the entire flow. You could implement that logic in your task itself. We have long-term roadmap items to support per-task environments but the complexity it introduces is extraordinary.
d
Ok thanks Jeremiah - so to step it back, I’m assuming I can do this myself by, for example, creating my basic splitting logic and then passing input=partitionX to an instance of my flow running on whatever env?
j
Yup, Prefect will execute whatever code you give it, including code that goes off into a different execution environment.
And you could just set up your tasks to wait for the work to complete
sort of a pure orchestration setup
d
Ok cool, thanks! Our use case consists of a mix of different execution models, like my one above, or a “provision” task that reaches from cloud A to cloud B to setup a bunch of worker nodes and then the follow on task distributes work across those nodes