-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Added workersList() method into queue #891
Conversation
Why do you need this? What problem does it solve? |
@aearly, in my situation, every task working for a few seconds (minutes), so I need to display progress queue. But in |
@@ -863,8 +863,17 @@ | |||
function _next(q, tasks) { | |||
return function(){ | |||
workers -= 1; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spliced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@megawac, I do not know what I guided when giving name. Renamed to removed
in force commit. 😄
Added workersList() method into queue
@aearly @kolomiichenko is this actually useful? I feel like you can get the same information on the progress by inspecting I want to better understand this use case, as this has become a bottleneck for queue |
I feel like the above comment explains it pretty well. Sometimes it is useful to know exactly which objects are being processed by the queue. |
workersList()
- a function returning the array of items currently being processed. This can be useful when it is not need push the new job to the queue if it's in process.