Open bhrigushr opened 3 years ago
The Github rollercoaster. You search the issues and find one with your EXACT problem 😄 and scroll down to find that there has been no response in a year and a half 😭 .
I know it is a long shot but, @bhrigushr, did you ever find a work-around for this?
@duinness I used individual functions to get stats like clusterQueued, running
@bhrigushr that was the exact conclusion I came to yesterday 👍
In case someone runs into this two years from now...
I ended up using node-redis and connected directly to my shared redis instance.
export const getBottleneckWaitingQueueCount = async () => { const waitingQueues = await client.hVals('b_service_name:local::queue_name_client_num_queued'); const sum = waitingQueues.reduce((partialSum, a) => partialSum + Number(a), 0); return sum; };
I am using Bottleneck to rate limit API requests and it's in distributed env(multiple servers) I want to report the status of jobs in limiter.
I tried to get status using the following:-
Getting
status
as an empty arrayAlso tried to get status using:-
Get
status
as:-even though there are jobs for limiter
I found that if I call the API
limiter.counts()
with the same instance object of limiter or group which is rate-limiting my API calls then I get the correct resultI want to retrieve the status of jobs in the different server which is not running those jobs
I am doing something wrong? Or Please advise how can I achieve the above functionality