diff --git a/Cargo.toml b/Cargo.toml index 2df1f1c8..1597b752 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,8 @@ external_sync = ["automation", "drive", "cache"] scripting = ["dep:rhai"] automation = ["scripting", "dep:cron"] drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:aws-smithy-async", "dep:pdf-extract"] +# local-files: Enables local file monitoring (scans /opt/gbo/data for bots) +# Without this feature, only MinIO/Drive is used as bot source local-files = ["dep:notify"] cache = ["dep:redis"] directory = ["rbac"] diff --git a/src/drive/mod.rs b/src/drive/mod.rs index d101c1c5..2b186bf9 100644 --- a/src/drive/mod.rs +++ b/src/drive/mod.rs @@ -345,7 +345,9 @@ pub async fn list_buckets( .filter_map(|b| { b.name().map(|name| { let name_str = name.to_string(); - // Only include buckets that start with "gbo-" + // Only include buckets that start with "gbo-" when local-files is NOT enabled + // This ensures only MinIO-sourced bots are used in cloud/gateway mode + #[cfg(not(feature = "local-files"))] if !name_str.starts_with("gbo-") { return None; } diff --git a/src/main_module/bootstrap.rs b/src/main_module/bootstrap.rs index d8ff1c98..d9b22162 100644 --- a/src/main_module/bootstrap.rs +++ b/src/main_module/bootstrap.rs @@ -893,9 +893,12 @@ pub async fn start_background_services( #[cfg(feature = "drive")] start_drive_monitors(app_state.clone(), pool).await; + // Local file monitoring only enabled when local-files feature is present #[cfg(feature = "local-files")] start_local_file_monitor(app_state.clone()).await; + // ConfigWatcher only enabled when local-files feature is present + #[cfg(feature = "local-files")] start_config_watcher(app_state.clone()).await; }