Nukesor / pueue

:stars: Manage your shell commands.
MIT License
4.67k stars 128 forks source link

Able to remove queued tasks from a group or clean/reset a specific group #530

Closed daviddwlee84 closed 1 month ago

daviddwlee84 commented 1 month ago

A detailed description of the feature you would like to see added.

Currently,

Currently, I can't find a good way to either clean/reset the group or simply remove the group and recreate.

Maybe we can have pueue group remove to support force remove even it has tasks in it. Or we can have pueue clean to accept flag that can clean up queued tasks. Or pueue reset on a specific group.

Explain your usecase of the requested feature

Assume that I am running something in other groups. And I accidently pueue add some tasks (submit plenty of tasks within a shell script) to a group that I don't want to execute and I pueue kill -g group_name will get a pause group with lots of queued tasks.

Now I want to use the same group name to run a new set of tasks.

As the "queued tasks" are many, so removing the task one by one by ids is not possible. And there are tasks running in other groups so pueue reset can't be used.

Alternatives

I can simply use a new group name to run the tasks. But this will leaves a paused group never used until everything done to pueue reset to get a "clean status".

Additional context

No response

Nukesor commented 1 month ago

This sounds pretty much like this would be solved by #482 ?

daviddwlee84 commented 1 month ago

Ah yes 😂. Didn't find that one.

Nukesor commented 1 month ago

Perfect, will close in favor of that one :)