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

Pass object to redis createClient #182

Merged
merged 2 commits into from
Feb 3, 2021
Merged

Pass object to redis createClient #182

merged 2 commits into from
Feb 3, 2021

Conversation

JohnMcLear
Copy link
Member

@JohnMcLear JohnMcLear commented Feb 1, 2021

As per discussion in ether/etherpad-lite#4693

@rhansen
Copy link
Member

rhansen commented Feb 3, 2021

I wonder if we should do this instead:

  if (this.settings.socket) {
    // Deprecated, but kept for backwards compatibility.
    this.client = redis.createClient(this.settings.socket,
        this.settings.client_options);
  } else if (this.settings.client_options) {
    // Deprecated, but kept for backwards compatibility.
    this.client = redis.createClient(this.settings.port,
        this.settings.host, this.settings.client_options);
  } else {
    // This is the preferred way to configure the client.
    this.client = redis.createClient(this.settings);
  }

Also, the minor version should be bumped in this PR.

@rhansen
Copy link
Member

rhansen commented Feb 3, 2021

Also, init() shouldn't call auth() in the redis.createClient(this.settings) case.

@JohnMcLear JohnMcLear merged commit 661b488 into master Feb 3, 2021
@rhansen rhansen deleted the redis-settings branch June 17, 2021 22:01
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