Skip to content
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

UX: make it more obvious that group is paused after pueue kill -g and tasks are scheduled as paused #265

Closed
d33tah opened this issue Nov 17, 2021 · 2 comments
Assignees
Labels
s: Client This issue touches the pueue client t: Feature A new feature that needs implementation
Milestone

Comments

@d33tah
Copy link

d33tah commented Nov 17, 2021

Is your feature request related to a problem? Please describe.

I recently needed to do pueue kill -g xargs -c. I was later surprised to see that newly added tasks aren't executed like they normally wood.

Describe the solution you'd like

After running pueue kill -g, print to the stderr that a group is paused. This is not necessarily an obvious consequence of pueue kill - note that e.g. Unix's kill doesn't also suspend the parent of the killed process, so I'm not exactly sure where how this behavior was inspired.

Also, it would be a good idea to warn the user that the group is paused if tasks are added to a paused group. Ideally, in a separate line and a different color so that it's more difficult to miss.

Describe alternatives you've considered

  1. don't pause groups by default
    • breaks backward compatibility
  2. add a way to override auto-pausing

Additional context

Tested under Pueue client 1.0.3, installed from cargo sometime last week.

@d33tah d33tah added the t: Feature A new feature that needs implementation label Nov 17, 2021
@d33tah d33tah changed the title UX: make it more obvious that tasks are paused UX: make it more obvious that group is paused and tasks are scheduled as paused Nov 17, 2021
@d33tah d33tah changed the title UX: make it more obvious that group is paused and tasks are scheduled as paused UX: make it more obvious that group is paused after group-kill and tasks are scheduled as paused Nov 17, 2021
@d33tah d33tah changed the title UX: make it more obvious that group is paused after group-kill and tasks are scheduled as paused UX: make it more obvious that group is paused after pueue kill -g and tasks are scheduled as paused Nov 17, 2021
@Nukesor
Copy link
Owner

Nukesor commented Nov 18, 2021

The idea behind this was, that one often doesn't want any follow-up tasks to start, if all tasks in a whole group are killed.

Most of the time, a group is killed because something went wrong or a mistake has been made. By pausing the affected group, we prevent that any other malicious commands will be executed. It might be unintuitive, but it's also the solution that breaks less things.

@Nukesor Nukesor added the s: Client This issue touches the pueue client label Dec 30, 2021
@Nukesor Nukesor added this to the v2.0.0 milestone Jan 12, 2022
@Nukesor
Copy link
Owner

Nukesor commented Jan 14, 2022

#280

This implements your initial proposal for better output in both cases:

  • When killing whole groups
  • When adding tasks to paused groups.

The different color is a little tricky, as the message comes from the daemon, but the styling can only be done by the client.
There currently exists no mechanism for such behavior.

@Nukesor Nukesor self-assigned this Jan 14, 2022
@Nukesor Nukesor closed this as completed Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: Client This issue touches the pueue client t: Feature A new feature that needs implementation
Projects
None yet
Development

No branches or pull requests

2 participants