From fd218bebba83dc4cf2c3aad1c3fa5d750fc128b7 Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Wed, 19 Jan 2022 15:21:56 +0100 Subject: [PATCH] hagridctl: Adapt import to sqlite backend. --- hagridctl/src/import.rs | 9 +++------ hagridctl/src/main.rs | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hagridctl/src/import.rs b/hagridctl/src/import.rs index e4b0a4b..407336e 100644 --- a/hagridctl/src/import.rs +++ b/hagridctl/src/import.rs @@ -114,15 +114,12 @@ impl <'a> ImportStats<'a> { fn import_from_files( config: &HagridConfig, - dry_run: bool, + _dry_run: bool, input_files: Vec, multi_progress: Arc, ) -> Result<()> { - let db = KeyDatabase::new_internal( - config.keys_internal_dir.as_ref().unwrap(), - config.keys_external_dir.as_ref().unwrap(), - config.tmp_dir.as_ref().unwrap(), - dry_run, + let db = KeyDatabase::new( + config.keys_base_dir.as_ref().unwrap(), )?; for input_file in input_files { diff --git a/hagridctl/src/main.rs b/hagridctl/src/main.rs index 7ac9dae..efe3dc4 100644 --- a/hagridctl/src/main.rs +++ b/hagridctl/src/main.rs @@ -36,8 +36,7 @@ pub struct HagridConfigs { #[derive(Deserialize,Clone)] pub struct HagridConfig { _template_dir: Option, - keys_internal_dir: Option, - keys_external_dir: Option, + keys_base_dir: Option, _assets_dir: Option, _token_dir: Option, tmp_dir: Option,