-
Notifications
You must be signed in to change notification settings - Fork 137
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
[Feature] Add priority to tasks #427
Comments
I guess a simple "-o/--priority" option should be still in scope. I won't work on this myself for now, as I'm quite short on time recently, so feel free to implement this yourself :) |
Thank you for your response! I'm not a Rust programmer yet, but there's a chance that I might become one soon. I will check if I can handle it. 🙏 |
If you don't find the time, don't worry. I'll get to it eventually^^ |
FYI, I started working on this :) |
Ok. I need a bit of input. I'm not 100% sure how to design the
What it's good for This works for the use-case that a user knows that a more important/less important tasks might get queued and gives them a "middle" priority by default of let's say What doesn't work Now I came up with the use-case of a user that didn't know about priorities or didn't prepare and wants to queue a task that should be processed at a later time (or at the very end). An alternative approach
I'm not sure if negative priorities are a good design decision, but it would cover all scenarios I can come up with. What do you think? |
I implemented the feature as described in the "alternative approach". In case you installed pueue via cargo, you can test the branch like this: git clone git@github.com:Nukesor/pueue
cd pueue
git switch task-priority
cargo install --path pueue |
Wow! thank you so much! I have tried to build this version, but got 17 errors, like in code below.
But I don't know how to do it.
|
In case your first question is still valid: |
Ah fuck. Sorry I forgot to add the
One of the ugly remainders of the first versions of Rust. |
Huh. That's weird. Sorry for the inconvenience. I accidentally introduced a semver breaking change in one of my other crates, which is used by Pueue. This is the aftermath of that mistake. If you pull now, you should however see the |
You used the wrong parameter :) The |
As you can see, you put the The command is You probably executed |
Anyhow, I already tested, added good test coverage it and I'm pretty sure it works as expected. Don't bother trying to get it running, I'll merge as is. |
I am sorry for my inattention. |
Actually, I use pueue in my script. P.S. I saw your comit with clarification, that Pueue is not for scripts, though as far as I can see it, Pueue suits my goals well enough and I am going to continue using it. Thank you again! |
A detailed description of the feature you would like to see added.
Please consider adding an option to the queue tasks to be executed immediately after the tasks that are currently running, without exceeding the current the parallel limit (as it would with the
pueue add -i
).Explain your usecase of the requested feature
I use Pueue as a queue manager for downloading files from the IPFS network. Typically, I have a long list of files that are added to the queue after several unsuccessful attempts. However, I want to be able to add the command to download new files with a higher priority. Unfortunately, I cannot use
pueue add -i
because I receive new CIDs in large batches.Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: