Hi, don't see this in the documentation so i'm checking whether its possible to remove a task from the queue.
I can contribute such feature, if it is not deliberate to not be able to remove tasks.
There might be some concurrency problems where a task is removed when it is running, but i think that could be solved with
What do you think?
It's possible, but it will be very tricky. There are a lot of assumptions in the queue code, mainly that you will only push() jobs on to it, rather than splice. Pausing the queue is also tricky due to other concurrent actions that might be in flight.
You may also want to check out https://www.npmjs.org/package/queue . It aims to implement all the Array.prototype methods in its queue implementation.
it's possible with q._tasks.removeLink ;)