Comments (11)
Sounds like pause --wait
and start
are exactly what I wanted - defer all added tasks and manually resume queueing later.
from pueue.
I'm curious, could you give a short explanation of your use-cases?
I.e. what are you using Pueue for and how are you using it (mostly manual, scripting, etc.)
I usually like to get a good understanding of a use-case before implementing a new feature.
from pueue.
In my case, I'm using pueue
to download files, some large, some small. I have a yt
group for youtube-dl
downloads with some parallel
setting.
Most of the time, I just enqueue as I browse, but I want to stash the downloads if I'm gonna turn my PC off soon, then start/enqueue the whole group when I'm back.
Basically, this is mostly for tasks that are most likely gonna take a long time but shouldn't or can't be continued after stopping.
from pueue.
This should actually not be necessary.
The pueue daemon automatically pauses groups that have "Queued" entries in it, when it starts up.
-> Just skip the step of stashing the tasks and start the group via pueue start
Alternatively, you can also explicitly pause the group via pueue pause -g your_group
. You can also add the --wait
option, if you want the current download to finish before rebooting.
from pueue.
The issue here is that start
will force-start the tasks, but I just want to enqueue
those tasks.
Stashing & pausing aren't the main issue here, it's wanting to resume queueing stashed tasks.
from pueue.
pueue start --group your_group
doesn't force-start all tasks of a group, it just resumes the group. I.e. tasks in a paused group won't be started, even if they're Queued
.
They'll only be started as soon as the group is marked as running
.
from pueue.
In my case, the group isn't pause. I just add & stash tasks with add -s -g mygroup ...
and enqueue
them later.
from pueue.
You could just do a pueue pause
and skip the -s
flag on add
lateron.
Wouldn't this work for you? If so, whats your exact usecase?
from pueue.
To give you an example:
pueue pause --group your_group
pueue add --group your_group 'some_command'
pueue add --group your_group 'some_other_command'
pueue add --group your_group 'some_other_command_2'
# Reboot the pc and restart pueued
pueue status
# This should show that `your_group` is paused
pueue start --group your_group
# Pueue should now process the group as usual
from pueue.
Oh I guess I misunderstood pause
and start
.
pause Either pause running tasks or specific groups of tasks.
By default, pauses the default group and all its tasks.
A paused queue (group) won't start any new tasks.
My understanding of pause
was: this will also pause running tasks like with ctrl+Z
and start
would later use something like fg
to resume them.
start Resume operation of specific tasks or groups of tasks.
By default, this resumes the default group and all its tasks.
Can also be used force-start specific tasks.
My understanding of start
was: this will put all the tasks in the group in the running
state, even if the number of tasks is larger than the parallel
setting.
Reading the wiki:
For instance,
pueue pause -g cpu
will pause all tasks in thecpu
group.
"Pause all tasks" sounded like "ctrl-Z
all tasks" to me.
If pause
stashes all tasks added after it's called, and start
later enqueue
s all those tasks, that sounds exactly like what I wanted.
from pueue.
For instance, pueue pause -g cpu will pause all tasks in the cpu group.
"Pause all tasks" sounded like "ctrl-Z all tasks" to me.
This is true, pueue pause
will indeed send a SIGSTOP to all running tasks, except you when you add the --wait
flag, as described in an earlier message :)
Alternatively, you can also explicitly pause the group via
pueue pause -g your_group
. You can also add the--wait
option, if you want the current download to finish before rebooting.
pueue start
will then continue all "Paused" tasks as well as normal operation for that group.
The pueue pause
call doesn't stash any tasks. It will just pause the Group, preventing any tasks from being automatically started.
from pueue.
Related Issues (20)
- Improve backend performance and scalability HOT 5
- [BUG] Minor: missing newline after status output HOT 5
- Scheduling parameters HOT 2
- [BUG] errors with non-UTF-8 task logs HOT 3
- [Bug] pueued being flagged as Trojan:Win32/Bearfoos.B!ml by Windows Defender HOT 7
- Include sha256 and/or md5 hashes for binary releases HOT 2
- Multi-user Question HOT 5
- send ctrl c to task HOT 1
- error loading completion HOT 2
- [Feature] Add priority to tasks HOT 19
- Enable to remove all groups HOT 6
- [Feature] Add `pueue group --json` flag HOT 2
- Extend `pueue wait` to wait for specific Done result states. HOT 9
- Make pueue be able to create pty by request HOT 3
- Improve `pueue follow` behaviour with a task that does not yet have logs HOT 2
- `pueue status` --query should support filtering tasks by ID HOT 7
- Terminal escape sequences with `follow` HOT 2
- [Bug] pueue 3.1.2 fails to build with rust 1.70 HOT 2
- How to exit `follow` without shutting down the daemon HOT 6
- Release .deb HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pueue.