Add RecyclingMethod to deadpool-redis#386
Conversation
This change adds a new `RecyclingMethod` enum to `deadpool-redis`, which can be used to clean up subscriptions when recycling connections. Also removing the support for configuring Redis connections via `AsyncConnectionConfig`. Part of the plan in deadpool-rs#226 Let me know if there's any other way I could help! (Not sure if you had these changes in another branch also, if that's the case happy to look at that and try to work off of your existing changes.)
|
There is one huge downside of this approach: That The idea I've been meaning to implement is a kind of The biggest issue is the lack of a Runtime object though. When an object is dropped it actually needs to be able to spawn a task for cleaning up the object before returning it to the pool. I guess it's finally the time to look into ahead of time recycling: I still want to make this opt-in and only perform the ahead of time recycling when passing in a I have to make up my mind how I want this automatic unsubscribe to work. Thanks for the PR! I'll decide if I want to merge this asap. |
|
Makes sense! I just ported over the existing code but have not made any actual logical changes yet -- UNWATCH from the existing repository. Btw I unblocked the build on my project by just making a separate redis::Client object for now but still happy to help with implementing anything if you'd like a hand! |
7a9da3d to
f713c85
Compare
54f37b5 to
b134227
Compare
This change adds a new
RecyclingMethodenum todeadpool-redis, which can be used to clean up subscriptions when recycling connections.Also removing the support for configuring Redis connections via
AsyncConnectionConfig. Part of the plan in #226Let me know if there's any other way I could help! (Not sure if you had these changes in another branch also, if that's the case happy to look at that and try to work off of your existing changes.)