https://prefect.io logo
Title
m

Mathuraju Sivasankar

02/11/2023, 4:17 PM
Hi, I have created sample python code with flow and task in VS code editor. Also I have started server using "prefect orion start" using CLI in windows. I am not seeing the running flow in the prefect UI (http://127.0.0.1:4200/). Could any one help me on this? Thanks in Advance.
1
j

Jeff Hale

02/11/2023, 5:19 PM
Are you running the flow by running a Python script or via a deployment?
m

Mathuraju Sivasankar

02/12/2023, 6:15 AM
Hi @Jeff Hale, I'm running the flow by using a Python script(VS code) locally.
I am able to see the deployments and flow runs. I have keep a scheduler for a flow which should run every 6 mins. But it is not execute the flow. I meant I do not see any logs in the prefect UI.
j

Jeff Hale

02/12/2023, 1:01 PM
Looks like you need to start an agent that will pull from that work pool.
prefect agent start --pool default-agent-pool
m

Mathuraju Sivasankar

02/13/2023, 6:19 PM
Hi @Jeff Hale I was running the command "prefect agent start -q 'testqueue' ". I tried as you suggested "prefect agent start --pool default-agent-pool" and I am getting the following exception. Also attached the code.txt file which I used for flow.
j

Jeff Hale

02/13/2023, 6:39 PM
No need to send to channel.
m

Mathuraju Sivasankar

02/13/2023, 6:47 PM
OK. Got you. 🙂
j

Jeff Hale

02/13/2023, 7:00 PM
Agent started! Looking for work from work pool ''default-agent-pool''...
Maybe there is an extra single quotes in there? Try this
prefect agent start -p default-agent-pool
You are running this with prefect 2.8.0?
m

Mathuraju Sivasankar

02/13/2023, 7:33 PM
YES @Jeff Hale. I am running with prefect 2.8.0
j

Jeff Hale

02/13/2023, 7:33 PM
ok. does copy pasting and running without the quotes work?
m

Mathuraju Sivasankar

02/14/2023, 12:33 PM
Thanks @Jeff Hale. I have moved a step ahead with your suggestion. 🙂 feel good. Agent successfully submit the flow_run. But flow run failed while validating the flow parameters. I have passed value 5(in the code) to the flow as a parameter. Could you help me on this?
j

Jeff Hale

02/14/2023, 1:16 PM
How did you pass it?
m

Mathuraju Sivasankar

02/14/2023, 1:25 PM
HI @Jeff Hale, In python script I directly called the function like as shown below-- I have hardcoded the value 5 to the my_flow(5) function. @flow(name="my_flow", task_runner=SequentialTaskRunner(), ) def my_flow(num): plusnum = first_task.submit(5) sqnum = second_task.submit(plusnum) print(f"add: {plusnum.result()}, square: {sqnum.result()}") # if name == "main": my_flow(5) Also, I have tried by updating parameters section in the description page of deployment in the server(localhost).