mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
chore: remove redundant caching code (#4804)
This commit is contained in:
@ -4,9 +4,7 @@ pub mod pub_sub;
|
||||
|
||||
use std::sync::{atomic, Arc};
|
||||
|
||||
use error_stack::ResultExt;
|
||||
use redis_interface::PubsubInterface;
|
||||
use router_env::{logger, tracing::Instrument};
|
||||
use router_env::tracing::Instrument;
|
||||
|
||||
use self::{kv_store::RedisConnInterface, pub_sub::PubSubInterface};
|
||||
|
||||
@ -42,30 +40,6 @@ impl RedisStore {
|
||||
.in_current_span(),
|
||||
);
|
||||
}
|
||||
|
||||
pub async fn subscribe_to_channel(
|
||||
&self,
|
||||
channel: &str,
|
||||
) -> error_stack::Result<(), redis_interface::errors::RedisError> {
|
||||
self.redis_conn.subscriber.manage_subscriptions();
|
||||
|
||||
self.redis_conn
|
||||
.subscriber
|
||||
.subscribe::<(), _>(channel)
|
||||
.await
|
||||
.change_context(redis_interface::errors::RedisError::SubscribeError)?;
|
||||
|
||||
let redis_clone = self.redis_conn.clone();
|
||||
let _task_handle = tokio::spawn(
|
||||
async move {
|
||||
if let Err(e) = redis_clone.on_message().await {
|
||||
logger::error!(pubsub_err=?e);
|
||||
}
|
||||
}
|
||||
.in_current_span(),
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl RedisConnInterface for RedisStore {
|
||||
|
||||
Reference in New Issue
Block a user