ConfigClient is an option no more; config client degraded mode

This commit is contained in:
veeso
2021-07-08 15:07:24 +02:00
parent b9cb961da6
commit e6b44e1461
12 changed files with 350 additions and 310 deletions

View File

@@ -67,12 +67,12 @@ impl ActivityManager {
pub fn new(local_dir: &Path, interval: Duration) -> Result<ActivityManager, HostError> {
// Prepare Context
// Initialize configuration client
let (config_client, error): (Option<ConfigClient>, Option<String>) =
let (config_client, error): (ConfigClient, Option<String>) =
match Self::init_config_client() {
Ok(cli) => (Some(cli), None),
Ok(cli) => (cli, None),
Err(err) => {
error!("Failed to initialize config client: {}", err);
(None, Some(err))
(ConfigClient::degraded(), Some(err))
}
};
let theme_provider: ThemeProvider = Self::init_theme_provider();