Skip to content

fix: delay initialization to the first query #364

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

Merged
merged 4 commits into from
May 13, 2024

Conversation

@supercaracal
Copy link
Member Author

@supercaracal supercaracal marked this pull request as ready for review May 13, 2024 04:19
@supercaracal supercaracal merged commit c1b7dd7 into redis-rb:master May 13, 2024
27 checks passed
@supercaracal supercaracal deleted the fix-delay-init branch May 13, 2024 04:19
end

def inspect
"#<#{self.class.name} #{@router.node_keys.join(', ')}>"
node_keys = @router.nil? ? @config.startup_nodes.keys : router.node_keys

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! 👋

I'm investigating the behavior of the redis-clustering gem and came across this PR.
I have a question about this specific method:

Why does this method directly access the @router variable instead of using the router method like other methods?
It seems that calling the router method would initialize @router.

Is there a specific reason for this approach? Any insights would be greatly appreciated!

Thanks in advance for your help!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the inspect method doesn't call a command, I thought it shouldn't be done the initialization.

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

Successfully merging this pull request may close these issues.

2 participants