Egil Bugge
04/05/2022, 6:16 AM@flow
def hello_world(name="world"):
print(f"Hello {name}!")
DeploymentSpec(
flow = hello_world,
name="hello-world",
)
• Made a work queue and connected the work queue to this deployment
• Span up an agent locally and connected it to this work queue
• Clicked into the Deployments tab in the UI and selected "Quick run" which scheduled a run of my flow
Then nothing happened, my local agent didn't pick up the flow. I then made a new work queue which I did not connect to the deployment and connected my agent to this new work queue instead. Now it immediately picked up the flow that I had started earlier and ran it.
Is there something more I need to do to get an agent to pick up flows connected to a deployment?Anna Geller
04/05/2022, 9:52 AMprefect work-queue create local -t local
prefect agent start QUEUE_ID
and then, on your DeploymentSpec use the same tag `local`:
DeploymentSpec(
flow=hello_world,
name="sandbox",
tags=["local"]
)
Egil Bugge
04/05/2022, 10:13 AM