New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose execution details from Executor to user level (eg Context) #443
Comments
Nope, that's not implemented, but the statistics themselves would want to live in the How to use the resulting data is a bit tougher since I assume you want either A) ability to access it within a task, via the context, or B) a general internal/core behavior where e.g. the Executor is itself displaying this progress bar as it goes. I'm curious about your real-world use case! Most tasks I'm familiar with tend to have some output as they run (even if it's high level log-esque statements and not command stdout) so a progress bar doesn't work too well there, only if there is no other output. (That said, I've experimented with a hybrid "one output line per task/subtask, and spinners/progress bars for commands that are known to take a long time" approach in some non-public tasks for my job, using libraries like |
Note to self, this may need a little bit of extension for Fabric as well, re: current host in a host list / current role / etc, though if those are couched in general enough terms (re: parameterization of a task) it may end up working 100% through the Invoke side of things. |
I kinda missed this issue. |
Here's a way to access the current
I'd recommend taking a look at Rich or Textual rather than ncurses: https://rich.readthedocs.io/en/stable/introduction.html or https://textual.textualize.io/getting_started/ |
I'm also looking at ways to communicate progress to the user while tasks run. Instead of a progress bar, I was thinking of something much simpler: when each task starts, Invoke prints a line "Task such-and-such starts" in the console, and perhaps a similar line when a task finishes. I can of course add my own print statement at the start of every task, but this could also be something that Invoke does (as an option, with a CLI flag like The
But it also prints a lot more :-) |
[Maintainer edit: this ticket is now about all general "what is the overall execution system up to?" functionality - current task, that task's args, results of CLI parsing, etc]
I'd like to print a progress bar that shows how many tasks have completed and how many remain.
The API currently does not expose these statistics as far as I know.
Is there any way I'm not familiar with to count the number of pending and completed tasks?
The text was updated successfully, but these errors were encountered: