feat: use subscriber client for subscription in pubsub (#1297)

This commit is contained in:
Kartikeya Hegde
2023-05-29 18:39:19 +05:30
committed by GitHub
parent 3534caca68
commit 864d85534f
3 changed files with 46 additions and 3 deletions

View File

@ -42,6 +42,9 @@ impl PubSubInterface for redis_interface::RedisConnectionPool {
&self,
channel: &str,
) -> errors::CustomResult<usize, redis_errors::RedisError> {
// Spawns a task that will automatically re-subscribe to any channels or channel patterns used by the client.
self.subscriber.manage_subscriptions();
self.subscriber
.subscribe(channel)
.await