mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
refactor(redis): spawn one subscriber thread for handling all the published messages to different channel (#5064)
This commit is contained in:
@ -68,6 +68,7 @@ impl RedisClient {
|
||||
|
||||
pub struct SubscriberClient {
|
||||
inner: fred::clients::SubscriberClient,
|
||||
pub is_subscriber_handler_spawned: Arc<atomic::AtomicBool>,
|
||||
}
|
||||
|
||||
impl SubscriberClient {
|
||||
@ -83,7 +84,10 @@ impl SubscriberClient {
|
||||
.wait_for_connect()
|
||||
.await
|
||||
.change_context(errors::RedisError::RedisConnectionError)?;
|
||||
Ok(Self { inner: client })
|
||||
Ok(Self {
|
||||
inner: client,
|
||||
is_subscriber_handler_spawned: Arc::new(atomic::AtomicBool::new(false)),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user