Egil Bugge

04/05/2022, 6:16 AM
Hey all! Tested out Prefect Orion in the cloud yesterday and had the following scenario: • Made a simple hello world flow with a deployment spec
def hello_world(name="world"):
    print(f"Hello {name}!")

    flow = 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 AM
If you are switching from Prefect 1.0 agents to Prefect 2.0 work-queues and agents, a good mental model would be treating a work-queue as a way to assign a label to your agent. For a local agent, you could assign a tag called `local`:
prefect work-queue create local -t local
prefect agent start QUEUE_ID
and then, on your DeploymentSpec use the same tag `local`:

Egil Bugge

04/05/2022, 10:13 AM
Ah, okey! Thank you :)
👍 1