config_path unwrapping mechanism
parent
4fb3533074
commit
5a1588e256
|
|
@ -51,7 +51,10 @@ fn load_processes(json_filename: &str) -> Option<Processes> {
|
|||
pub async fn get_actual_config(params : Arc<PrebootParams>) -> Option<Processes> {
|
||||
// * if no local conf -> loop and +inf getting conf from redis server
|
||||
// * if local conf -> once getting conf from redis server
|
||||
let config_path = params.config.to_str()?;
|
||||
let config_path = params.config.to_str().unwrap_or_else(|| {
|
||||
error!("Invalid character in config file. Config path was set as default");
|
||||
"settings.json"
|
||||
});
|
||||
info!("Configurating config module with params: no-remote-config={}, no-sub={}, local config path={:?}, remote server={}", params.no_remote_config, params.no_sub, params.config, params.remote_server_url);
|
||||
match load_processes(config_path) {
|
||||
Some(local_conf) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue