Skip to content

Commit 0c81d6a

Browse files
committed
refactor(utils): move image_store from daemon to malbox-utils
- Move image store watcher module to malbox-utils - Add malbox-database and notify deps to malbox-utils - Remove notify dep from malbox-daemon
1 parent 480025d commit 0c81d6a

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

back-end/bin/malbox-daemon/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ color-eyre = { workspace = true }
3636
tokio = { workspace = true }
3737
thiserror = { workspace = true }
3838
tracing = { workspace = true }
39-
notify = { workspace = true }

back-end/bin/malbox-daemon/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use malbox_utils::SampleStore;
1313
use std::sync::Arc;
1414

1515
pub mod error;
16-
mod image_store;
1716
mod providers;
1817
mod provisioners;
1918

@@ -39,7 +38,7 @@ pub async fn run(config: &Config) -> error::Result<()> {
3938
if let Some(ref images_config) = config.images {
4039
let store_path = std::path::PathBuf::from(&images_config.store_path);
4140
if store_path.exists() {
42-
image_store::spawn_image_watcher(store_path, db.clone());
41+
malbox_utils::image_store::spawn_image_watcher(store_path, db.clone());
4342
} else {
4443
tracing::warn!(
4544
"Image store path does not exist: {}",

back-end/crates/malbox-utils/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ tokio = { workspace = true }
1616
thiserror = { workspace = true }
1717
tracing = { workspace = true }
1818
tempfile = { workspace = true }
19+
20+
# image_store
21+
malbox-database = { path = "../malbox-database" }
22+
notify = { workspace = true }
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub mod hashing;
2+
pub mod image_store;
23
pub mod storage;
34

45
pub use storage::SampleStore;

0 commit comments

Comments
 (0)