Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Dec 24, 2024
1 parent 1c5144f commit 467a101
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ pub enum MessageBroker {
Redis(String),
}

#[cfg(feature = "dist-server")]
fn message_broker_from_env() -> Option<MessageBroker> {
None.or(std::env::var("AMQP_ADDR").ok().map(MessageBroker::AMQP))
.or(std::env::var("REDIS_ADDR").ok().map(MessageBroker::Redis))
Expand All @@ -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};
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 467a101

Please sign in to comment.