Skip to content
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

queueing event #115

Open
ptorrent opened this issue Jan 26, 2023 · 2 comments
Open

queueing event #115

ptorrent opened this issue Jan 26, 2023 · 2 comments
Labels
question Further information is requested

Comments

@ptorrent
Copy link

ptorrent commented Jan 26, 2023

Hell there,

Regarding rethinkdbdash, there is the

queueing: when a query is added/removed from the queue (queries waiting for a connection), the size of the queue is provided

I receive the "queueing" event on the pool but the value is always undefined !

pool.on('queueing', x => console.log(x))

always give me undefined.

Is that normal ?

@ptorrent ptorrent added the bug Something isn't working label Jan 26, 2023
@ptorrent
Copy link
Author

ptorrent commented Jan 26, 2023

Is that correct ?

this.emit('queueing',this.getPoolNumOfRunningQueries());
....
getPoolNumOfRunningQueries() {
    return this.getHealthyServerPools().reduce((a, next) => a + next.getNumOfRunningQueries(),0);
}

in master-pool.js

@atassis atassis added question Further information is requested and removed bug Something isn't working labels Jan 26, 2023
@atassis
Copy link
Collaborator

atassis commented Jan 26, 2023

There is no argument provided in the code now for that event, but I see no issue in using the public method to retrieve it from method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants