-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Helper methods to use a Jedis object #3520
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #3520 +/- ##
============================================
- Coverage 71.25% 71.25% -0.01%
- Complexity 4765 4769 +4
============================================
Files 277 277
Lines 14999 15010 +11
Branches 1057 1057
============================================
+ Hits 10688 10695 +7
- Misses 3848 3850 +2
- Partials 463 465 +2
☔ View full report in Codecov by Sentry. |
@@ -401,4 +403,21 @@ public final Pool<Connection> getPool() { | |||
public Pipeline pipelined() { | |||
return (Pipeline) super.pipelined(); | |||
} | |||
|
|||
public Jedis newJedis() { | |||
return new Jedis(getPool().getResource()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bears the similar issue stated in #3533 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I didn't know this was there.
I'll close this PR and make one that limits helpers to JedisPool
I think now that JedisPooled doesn't need helpers like I've done
Thanks
A couple of simple methods to operate with a Jedis object with JedisPool and JedisPooled without worrying about closing resources.