fix(router): subscriber return type (#1292)

This commit is contained in:
Kartikeya Hegde
2023-05-31 13:13:55 +05:30
committed by GitHub
parent fa392c40a8
commit 55bb117e1d

View File

@ -23,10 +23,7 @@ use crate::{
#[async_trait::async_trait]
pub trait PubSubInterface {
async fn subscribe(
&self,
channel: &str,
) -> errors::CustomResult<usize, redis_errors::RedisError>;
async fn subscribe(&self, channel: &str) -> errors::CustomResult<(), redis_errors::RedisError>;
async fn publish<'a>(
&self,
@ -40,10 +37,7 @@ pub trait PubSubInterface {
#[async_trait::async_trait]
impl PubSubInterface for redis_interface::RedisConnectionPool {
#[inline]
async fn subscribe(
&self,
channel: &str,
) -> errors::CustomResult<usize, redis_errors::RedisError> {
async fn subscribe(&self, channel: &str) -> errors::CustomResult<(), 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();