New feature idea: new "real-time" priority task which can pause currently running tasks
- Dominant language
- JavaScript
- Stars
- 9.4k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
I know this will probably not be a _high priority_, but here's an idea for a new feature. What do you think?
- Add a new job priority value "real-time" (like in windows i guess).
- When a real-time priority task gets enqueued, look for the lowest priority tasks, then find the newest one
- Pause this job (if possible, otherwise cancel and place back in inactive?) and let the new task take up its place
My use-case is I still want to use kue as my main task distribution system because I love it, but I want to create synchronous requests to a service (previously they were all asynchronous, api request to upload a task, then listen for a "done" on an endpoint). I want to have the user be able to send one request, and get the answer as response within a few seconds (because my process takes that long).
I would be happy to give implementing this a try, but as this is not a necessity for work, I don't know if I'll be able to invest a lot of time. But who knows, maybe one day I'll try and send you a pull request :)
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by locating Kue’s priority handling and worker scheduling paths, then determine whether pausing, cancelling, and re-queuing are supported; done would require an agreed real-time priority behavior and tests for its scheduling effects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, redis
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100