mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
refactor(redis): spawn one subscriber thread for handling all the published messages to different channel (#5064)
This commit is contained in:
@ -72,7 +72,7 @@ impl ConfigInterface for Store {
|
||||
self.get_redis_conn()
|
||||
.map_err(Into::<errors::StorageError>::into)?
|
||||
.publish(
|
||||
cache::PUB_SUB_CHANNEL,
|
||||
cache::IMC_INVALIDATION_CHANNEL,
|
||||
CacheKind::Config((&inserted.key).into()),
|
||||
)
|
||||
.await
|
||||
@ -179,7 +179,10 @@ impl ConfigInterface for Store {
|
||||
|
||||
self.get_redis_conn()
|
||||
.map_err(Into::<errors::StorageError>::into)?
|
||||
.publish(cache::PUB_SUB_CHANNEL, CacheKind::Config(key.into()))
|
||||
.publish(
|
||||
cache::IMC_INVALIDATION_CHANNEL,
|
||||
CacheKind::Config(key.into()),
|
||||
)
|
||||
.await
|
||||
.map_err(Into::<errors::StorageError>::into)?;
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ pub async fn get_store(
|
||||
tenant,
|
||||
master_enc_key,
|
||||
cache_store,
|
||||
storage_impl::redis::cache::PUB_SUB_CHANNEL,
|
||||
storage_impl::redis::cache::IMC_INVALIDATION_CHANNEL,
|
||||
)
|
||||
.await?
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user