Clean up local-files feature comments
Some checks failed
BotServer CI/CD / build (push) Failing after 2m48s
Some checks failed
BotServer CI/CD / build (push) Failing after 2m48s
- Keep local-files feature flag for conditional local file monitoring - Keep gbo- bucket filtering in drive - Remove verbose comments
This commit is contained in:
parent
62d0da3923
commit
c5a44f7889
3 changed files with 1 additions and 7 deletions
|
|
@ -25,8 +25,6 @@ external_sync = ["automation", "drive", "cache"]
|
||||||
scripting = ["dep:rhai"]
|
scripting = ["dep:rhai"]
|
||||||
automation = ["scripting", "dep:cron"]
|
automation = ["scripting", "dep:cron"]
|
||||||
drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:aws-smithy-async", "dep:pdf-extract"]
|
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"]
|
local-files = ["dep:notify"]
|
||||||
cache = ["dep:redis"]
|
cache = ["dep:redis"]
|
||||||
directory = ["rbac"]
|
directory = ["rbac"]
|
||||||
|
|
|
||||||
|
|
@ -345,9 +345,7 @@ pub async fn list_buckets(
|
||||||
.filter_map(|b| {
|
.filter_map(|b| {
|
||||||
b.name().map(|name| {
|
b.name().map(|name| {
|
||||||
let name_str = name.to_string();
|
let name_str = name.to_string();
|
||||||
// Only include buckets that start with "gbo-" when local-files is NOT enabled
|
// Only include buckets that start with "gbo-" (MinIO bot source)
|
||||||
// This ensures only MinIO-sourced bots are used in cloud/gateway mode
|
|
||||||
#[cfg(not(feature = "local-files"))]
|
|
||||||
if !name_str.starts_with("gbo-") {
|
if !name_str.starts_with("gbo-") {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -893,11 +893,9 @@ pub async fn start_background_services(
|
||||||
#[cfg(feature = "drive")]
|
#[cfg(feature = "drive")]
|
||||||
start_drive_monitors(app_state.clone(), pool).await;
|
start_drive_monitors(app_state.clone(), pool).await;
|
||||||
|
|
||||||
// Local file monitoring only enabled when local-files feature is present
|
|
||||||
#[cfg(feature = "local-files")]
|
#[cfg(feature = "local-files")]
|
||||||
start_local_file_monitor(app_state.clone()).await;
|
start_local_file_monitor(app_state.clone()).await;
|
||||||
|
|
||||||
// ConfigWatcher only enabled when local-files feature is present
|
|
||||||
#[cfg(feature = "local-files")]
|
#[cfg(feature = "local-files")]
|
||||||
start_config_watcher(app_state.clone()).await;
|
start_config_watcher(app_state.clone()).await;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue