-
Notifications
You must be signed in to change notification settings - Fork 26
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
Control over the spinner when using concurrency #2
Comments
The work on spinners was prompted by the following: xolox/python-executor#2 Everything else was me going mad on a refactoring spree 😇
Just wanted to acknowledge your ongoing commitment to the quality of your software. I truly appreciate you caring about such an old issue and look forward to the point where executor is updated accordingly to match the humanfriendly updates <3 |
Hi Matthew, first of all thanks for the feedback. Second, sorry it took me so long to get back to this! I've just released executor 23.1 which enables fine grained control over the spinner shown by command pools. Here's a silly example I used to confirm that it works as intended, this assumes Python 3: from executor import ExternalCommand
from executor.concurrent import CommandPool
from humanfriendly.terminal.spinners import Spinner
pool = CommandPool(spinner=Spinner(glyphs=['◐', '◓', '◑', '◒'], interval=0.5))
pool.add(ExternalCommand('sleep', '20'))
pool.add(ExternalCommand('sleep', '15'))
pool.add(ExternalCommand('sleep', '10'))
pool.run() I'm going to close this issue now because I think I've adequately implemented your feature request, but if you disagree feel free to reopen this issue or open a new one. Cheers! |
No need to apologise :) Thank you so much! |
It would be nice to have some level of control over the spinner that is displayed when using concurrency. For example, I would like to be able to have it re-render the spinner only once every 1-2 seconds, rather than constantly.
The text was updated successfully, but these errors were encountered: