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 :)
I know this will probably not be a high priority, but here's an idea for a new feature. What do you think?
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 :)