UX idea: make pueue parallel
return current level of parallelism if not extra argument was given
#264
Labels
s: Client
This issue touches the pueue client
s: Daemon
This issue touches pueue daemon
t: Feature
A new feature that needs implementation
Hi! First of all, thanks for creating pueue! It's a real gem - I rarely find a tool that I pick up so quickly and immediately come up with many use cases for!
I sometimes use pueue as a tunable replacement for
xargs -P
. I start with a small number of parallel processes and once I get a better feel of how much resources I need, I ramp it up. Now, the question is: how much should I raise the limit by? I can't just saypueue parallel -g xargs +10
to increase it by 10 (or at least it doesn't seem to be documented), so I first need to find out what's the current level. Now, if the queue is deep, this information is "hidden" at the top ofpueue status -g xargs
. Beacuse of that, there's a major risk of the user missing the proverbial needle in the haystack.My proposed solution is to change the behavior of
pueue parallel -g xargs
. Currently it prints an error saying it's missing a parameter:My suggestion is for it to return something like "Current parallelism for group xargs is: 20. In order to change it, run
pueue parallel --group <group> <PARALLEL_TASKS>
. This behavior of "get if no parameters, set if there's one" is common in other CLI tools, though nothing other than Git immediately comes to my mind.Describe alternatives you've considered
pueue parallel --get-paralellism -g xargs
pueue parallel -g xargs +10
Actually solution no. 2 and what I proposed above aren't mutually exclusive, so it might be a good idea to implement both.
Additional context
Feature wasn't there as of
1.0.3
, which I installed via cargo sometime last week.The text was updated successfully, but these errors were encountered: