also quick question, if we were to set up a worker...
# prefect-cloud
p
also quick question, if we were to set up a worker pull, what's the best way to invoke a flow from our production server? for example, if we just call the python function directly for the flow, will that execute on the worker natively? or does it have to be a deployment and then would that deployment have to be triggered with an event?
n
hi @Pratham > if we just call the python function directly for the flow, will that execute on the worker natively no! that will just run the python function and the flow run metadata will be sent to your server, but it wont be associated with a deployment / run on remote infra > or does it have to be a deployment yes, to triggers runs of flows on remote infra (depending on your worker / work pool type) you'd create a deployment from your flow and then you can •
run_deployment("my-flow/my-deployment")
from the SDK •
prefect deployment run my-flow/my-deployment
from the CLI • click
Run
in the UI • deploy your flow with some
triggers
so that the server schedules runs when an event happens • assign it one or many
schedules
that it should run on
p
oh perfect yeah run_deployment was exactly what i was looking for thank you
👍 1