Closed tnsardesai closed 6 months ago
Please take a look at the help output of pueue clean
pueue clean -h
in case you didn't know that there're help pages for subcommands.
I didn't realize that there are help pages for subcommands! pueue clean --successful-only
solves my problem so I am gonna close this issue š
A detailed description of the feature you would like to see added.
Today
pueue clean
cleans all finished tasks. I would like to see a new optional argument to clean tasks withSuccess
status only. Specifically what I would like to see is that this command should not remove tasks with statusFailed
pueue clean success
to clean successful tasks onlypueue clean
to clean all tasks (default behavior)Explain your usecase of the requested feature
I run
watch -c 'unbuffer pueue status'
in a terminal window for a nice dashboard to monitor my tasks. I occasionally runpueue clean
to remove finished tasks. But everytime I runpueue clean
I have to first check if any of the finished tasks failed or not. I would like to not worry about that and just runpueue clean success
which cleans up the uninteresting case (successful tasks) and keep the interesting case (failed tasks). This way at the end I can loop through the output and perform whatever actions I want against the failed tasksAlternatives
Currently I just grep the output, make a note of what failed and why and then run
pueue clean
. I have to be careful that between my grep and the clean nothing else fails. Another way I could do this is grep for success and get the task ids and then call pueue remove on those task ids.Additional context
No response