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

Disconnecting from Cluster while waiting for all pending commands #315

Closed
shaharmor opened this issue Jun 1, 2016 · 4 comments · Fixed by qubyte/rubidium#114
Closed
Assignees
Labels

Comments

@shaharmor
Copy link
Collaborator

Hi,

Is it possible today to disconnect (or quit) a Redis Cluster while waiting for all pending commands to finish?

I know that i can do redis.quit() on a single instance, but what about Cluster?
Should i just do cluster.nodes() and run redis.quit() on each?

I tried that but the cluster keeps reconnecting. Should it somehow detect that we called .quit() and not try to reconnect?

@luin
Copy link
Collaborator

luin commented Jun 2, 2016

Hmm...Currently Cluster#disconnect() will disconnect all nodes, but it won't wait for all pending commands.

I've not tried but setting this.manuallyClosing to true and calling this.setStatus('disconnecting') before invoking redis.quit() for each cluster.nodes() should be about to prevent nodes from reconnecting.

Seems we can add a Cluster#quit() method to do this for users.

@shaharmor
Copy link
Collaborator Author

That would be awesome 👍

@shaharmor
Copy link
Collaborator Author

hey @luin, any chance to get this implemented?

@luin
Copy link
Collaborator

luin commented Jun 21, 2016

A little busy these two weeks. I'll revisit this issue this weekend. 🚴

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

Successfully merging a pull request may close this issue.

2 participants