Hi, I encountered a use-case that I want to dedupe the queue that it won't be doing uneccessary work. Like before I'm pushing to the queue, I will make sure the task doesn't exists in the queue yet..
However, task usually run right away right after I push it into queue.. and 1 second later something else that would trigger the same task, but at this point the prev task is already executing.
is it possible to add a delay to control when the task should start ie queue.push(task, {delay: 2000}) ?
Hi, I encountered a use-case that I want to dedupe the queue that it won't be doing uneccessary work. Like before I'm pushing to the queue, I will make sure the task doesn't exists in the queue yet..
However, task usually run right away right after I push it into queue.. and 1 second later something else that would trigger the same task, but at this point the prev task is already executing.
is it possible to add a delay to control when the task should start ie
queue.push(task, {delay: 2000})
?