Hi, I'm wondering how I go about showing the run t...
# general
a
Hi, I'm wondering how I go about showing the run time (progress?) of a long-running
Process
during its execution?
1
b
Heya! A two questions: 1. Are you writing a custom plugin, or just using existing plugins? I assume a custom plugin, but just confirming 2. What sort of output are you hoping for? For instance, is there an existing plugin/process that gives "good" behaviour?
a
Hi, thanks for the reply! Yes, I'm writing a custom plugin and calling
await Get(ProcessResult, Process(...))
myself. I'm looking for a simple output in the command line output, where the time will update in real time:
. Description of the process (time: 5m10s)
I may have disabled it by accident without knowing it as I remember it was showing up by default at some point. If that's the case, do you mind guiding me to where I can configure this?
b
I suspect it is something to do with (log) level of the process. I’m not sure of the details off the top of my head. If you can find an example of running a built-in backend that does the right thing, looking at how it is configured in the main pants code base would be a good reference I’m happy to help you find the code if you can point to a specific example.
a
Thanks! I think those suggestions are helpful and I was able to figure out the issue: It seems when I try to write something to the Console through
print_stdout()
, it somehow prevents the default dynamic UI from rendering. So if I just move the
console.print_stdout()
after invocations of
Process
, the UI will render correctly.