mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2024-09-20 07:16:18 +08:00
Fix: Lookup reload does not include database settings
This commit is contained in:
parent
efbddd1cdd
commit
794b8f2e50
|
@ -64,7 +64,7 @@ impl Core {
|
|||
}
|
||||
|
||||
pub async fn reload_lookups(&self) -> trc::Result<ReloadResult> {
|
||||
let mut config = self.storage.config.build_config("certificate").await?;
|
||||
let mut config = self.storage.config.build_config("lookup").await?;
|
||||
let mut stores = Stores::default();
|
||||
stores.parse_memory_stores(&mut config);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ use utils::config::{utils::AsKey, Config};
|
|||
pub mod lookup;
|
||||
pub mod pool;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RedisStore {
|
||||
pool: RedisPool,
|
||||
}
|
||||
|
@ -186,3 +187,12 @@ fn build_pool<M: Manager>(
|
|||
fn into_error(err: impl Display) -> trc::Error {
|
||||
trc::StoreEvent::RedisError.reason(err)
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for RedisPool {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Single(_) => f.debug_tuple("Single").finish(),
|
||||
Self::Cluster(_) => f.debug_tuple("Cluster").finish(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ pub enum FtsStore {
|
|||
ElasticSearch(Arc<ElasticSearchStore>),
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum LookupStore {
|
||||
Store(Store),
|
||||
Query(Arc<QueryStore>),
|
||||
|
@ -228,6 +228,7 @@ pub enum LookupStore {
|
|||
Memory(Arc<MemoryStore>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct QueryStore {
|
||||
pub store: LookupStore,
|
||||
pub query: String,
|
||||
|
|
Loading…
Reference in a new issue