sorccu / r2d2-redis

MIT License
101 stars 42 forks source link

Add support redis's async/await connection support? `client.get_async_connection()` #45

Open curiousdev opened 4 years ago

curiousdev commented 4 years ago

I'm happy to submit a PR. Though I may need a little guidance.

The new version of the redis crate supports async/await operations. Usage of this requires, the pooled connections to be retrieved using the new client.get_async_connection(). Currently the RedisConnectionManager relies on the original synchronous get_connection(), thereby limiting users only to the synchronous operations.

I would like to add the async/await support. I propose creating RedisAsyncConnectionManager who's fn connect(&self) method uses client.get_async_connection().

Would you be willing to accept a PR to address this? Any advice would be appreciated.