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

Allow Redis Connection to be Injected #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

allcentury
Copy link

@allcentury allcentury commented Nov 1, 2019

See issue #188 for details.

Prior to this change, pooled redis connections were hard to share across jobs.

Now you can inject your own redis connection into the intiailizer via
the redis_conn parameter.

See issue jekyll#188 for details.

Prior to this change, pooled redis connections were hard to share across.

Now you can inject your own redis connection into the intiailizer via
the `redis_conn` parameter.
@allcentury
Copy link
Author

@ashmaroli friendly ping - does all look ok here?

@ashmaroli
Copy link
Member

Sorry. This had slipped out of my radar..
However, I'll leave the merging to other maintainers here.

@lewispb
Copy link

lewispb commented Dec 6, 2019

+1 for this

@@ -33,7 +36,7 @@ def initialize(options = {})
raise NoRedisError
end

@redis = Redis.new(options)
@redis = options.fetch(:redis_conn, Redis.new(options))
Copy link

Choose a reason for hiding this comment

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

Minor point but my preference for the argument name would just be redis.

Suggested change
@redis = options.fetch(:redis_conn, Redis.new(options))
@redis = options.fetch(:redis, Redis.new(options))

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.

3 participants