From 467a1010809272233be0d67ecaf5def9b2153352 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 24 Dec 2024 23:44:24 +0000 Subject: [PATCH] fix typo --- src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 7c40bbb0d..daba622e2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1118,6 +1118,7 @@ pub enum MessageBroker { Redis(String), } +#[cfg(feature = "dist-server")] fn message_broker_from_env() -> Option { None.or(std::env::var("AMQP_ADDR").ok().map(MessageBroker::AMQP)) .or(std::env::var("REDIS_ADDR").ok().map(MessageBroker::Redis)) @@ -1128,6 +1129,7 @@ pub mod scheduler { use std::path::PathBuf; use std::{net::SocketAddr, str::FromStr}; + use crate::config::message_broker_from_env; use crate::errors::*; use serde::{Deserialize, Serialize}; @@ -1320,8 +1322,8 @@ pub mod scheduler { #[cfg(feature = "dist-server")] pub mod server { use super::{ - config_from_env, try_read_config_file, CacheConfigs, CacheModeConfig, CacheType, - DiskCacheConfig, MessageBroker, + config_from_env, message_broker_from_env, try_read_config_file, CacheConfigs, + CacheModeConfig, CacheType, DiskCacheConfig, MessageBroker, }; use serde::{Deserialize, Serialize}; use std::path::PathBuf;