Can anyone provide any advice or a pointer to some...
# prefect-ui
q
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
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;
Copy code
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:
Copy code
await deployment.apply()
q
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
Do you have an agent running?
q
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
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
Yes. More precisely, it says scheduled before the start time and then changes to pending after the start time passes.
r
What does your agent's output show? Are there any error messages?
q
Where would I look for agent output?
r
in the terminal when you ran
prefect agent start -q default
q
No, there's no output in that terminal.