Jacques
10/02/2020, 2:27 PMEnvironment
- should calling flow.run()
use the Executor
defined in the env if I declared the flow with something like Flow("myflow", environment=MyEnvironment())
- or is that only used by prefect agents?Dylan
flow.run()
is intended to be a pure python process, no executor or environment necessary there. Environments and executors are only used by Prefect Agents 👍Jacques
10/02/2020, 2:30 PMDylan
Dylan
flow.run()
to test your environment?Jacques
10/06/2020, 1:56 PMLambdaEnvironment(lambda_context).execute(flow, parameters)
seems broadly similar to what an agent would be doing - if that makes any sense. It is hard to try and fit Prefect into a serverless environment.Dylan
Dylan
LambdaEnvironment
if you’d be interested in making a PR back to Prefect CoreJim Crist-Harif
10/06/2020, 2:30 PMflow.run()
will use that executor.Jacques
10/06/2020, 2:33 PMJim Crist-Harif
10/06/2020, 2:36 PMflow.run
never looks at flow.environment
. In the future environments will only be for configuring the "job" (k8s job, fargate task, local process, lambda run, etc...) that the flow runs in, the execution once that process starts up will all be configured on the flow and should be equivalent to flow.run()
.Jim Crist-Harif
10/06/2020, 2:37 PMJacques
10/06/2020, 2:44 PM