https://prefect.io logo
Title
q

q ret

02/15/2023, 2:42 PM
Can anyone provide any advice or a pointer to some documentation about how to get the deployments set-up to see in the UI? I did some googling for help on this topic but didn't find anything. Thanks!
r

Ryan Peden

02/15/2023, 3:40 PM
The
build_from_flow
and
apply
methods are both async functions; we've made it so you can call them from non-async places without using await, but you'll need to
await
them if you call them from an async context (such as the top level of a notebook). So in this case, I believe you'd just need to write;
deployment = await Deployment.build_from_flow(
    flow=download_test_flow,
    name="download_test_flow-deployment", 
    version=1, 
    apply = True,
)
Since you have
apply = True
I don't think you'd need to call apply separately, but if you wanted to, it would then be:
await deployment.apply()
q

q ret

02/15/2023, 4:00 PM
That looks like it worked for me. Thank you! (In case others look at this convo: the "await" and "Deployment ..." need to be on the same line.)
👍 1
Now I'm having the following issue. I was able to get the deployment set-up. However, whenever I launch the flow from the deployment either with a Quick Run or a Custom Run with a start time a few minutes hence, the flow just goes to pending. I'm able to run the flow directly (i.e., not through the deployment) and also I checked in the Work Pools and the Work Queue status is healthy. Thanks for any help.
r

Ryan Peden

02/15/2023, 5:40 PM
Do you have an agent running?
q

q ret

02/15/2023, 5:41 PM
Yes. Initially, the Work Queue status was unhealthy. But googling around I then ran:
prefect agent start -q default
And the Work Queue status changed to healthy.
r

Ryan Peden

02/15/2023, 5:44 PM
Ok, that makes sense since Pending indicates an agent picked up the flow run, but hasn't yet started running the flow. Does the flow run just stay as Pending even after its scheduled start time?
q

q ret

02/15/2023, 5:46 PM
Yes. More precisely, it says scheduled before the start time and then changes to pending after the start time passes.
r

Ryan Peden

02/15/2023, 5:47 PM
What does your agent's output show? Are there any error messages?
q

q ret

02/15/2023, 5:48 PM
Where would I look for agent output?
r

Ryan Peden

02/15/2023, 5:48 PM
in the terminal when you ran
prefect agent start -q default
q

q ret

02/15/2023, 5:49 PM
No, there's no output in that terminal.