fix: Re-enable LocalFileMonitor to compile .bas files
Some checks failed
BotServer CI/CD / build (push) Failing after 48s
Some checks failed
BotServer CI/CD / build (push) Failing after 48s
- LocalFileMonitor compiles .bas files from /opt/gbo/data to /opt/gbo/work - DriveMonitor (S3) needs to sync files from MinIO to /opt/gbo/data first - This restores the compilation pipeline that was broken
This commit is contained in:
parent
c67d90ee13
commit
bc37ffc6a5
1 changed files with 15 additions and 18 deletions
|
|
@ -895,11 +895,8 @@ pub async fn start_background_services(
|
|||
#[cfg(feature = "drive")]
|
||||
start_drive_monitors(app_state.clone(), _pool).await;
|
||||
|
||||
// Local file monitoring removed - Drive (MinIO) is the only source now
|
||||
// #[cfg(feature = "local-files")]
|
||||
// start_local_file_monitor(app_state.clone()).await;
|
||||
|
||||
// #[cfg(feature = "local-files")]
|
||||
// Start LocalFileMonitor to compile .bas files from /opt/gbo/data to /opt/gbo/work
|
||||
start_local_file_monitor(app_state.clone()).await;
|
||||
// start_config_watcher(app_state.clone()).await;
|
||||
}
|
||||
|
||||
|
|
@ -1132,23 +1129,23 @@ fn create_bot_from_drive(
|
|||
}
|
||||
|
||||
|
||||
// // LocalFileMonitor and ConfigWatcher disabled - drive (MinIO) is the only source now
|
||||
// async fn start_local_file_monitor(app_state: Arc<AppState>) {
|
||||
// use crate::drive::local_file_monitor::LocalFileMonitor;
|
||||
//
|
||||
// let monitor = LocalFileMonitor::new(app_state.clone());
|
||||
// if let Err(e) = monitor.start_monitoring().await {
|
||||
// error!("Failed to start LocalFileMonitor: {}", e);
|
||||
// } else {
|
||||
// trace!("LocalFileMonitor started - monitoring /opt/gbo/data for bot changes");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// LocalFileMonitor compiles .bas files from /opt/gbo/data to /opt/gbo/work
|
||||
async fn start_local_file_monitor(app_state: Arc<AppState>) {
|
||||
use crate::drive::local_file_monitor::LocalFileMonitor;
|
||||
|
||||
let monitor = LocalFileMonitor::new(app_state.clone());
|
||||
if let Err(e) = monitor.start_monitoring().await {
|
||||
error!("Failed to start LocalFileMonitor: {}", e);
|
||||
} else {
|
||||
trace!("LocalFileMonitor started - monitoring /opt/gbo/data for bot changes");
|
||||
}
|
||||
}
|
||||
//
|
||||
// async fn start_config_watcher(app_state: Arc<AppState>) {
|
||||
// use crate::core::config::watcher::ConfigWatcher;
|
||||
// use crate::core::shared::utils::get_work_path;
|
||||
// use std::sync::Arc as StdArc;
|
||||
//
|
||||
//
|
||||
// let data_dir = std::path::PathBuf::from(get_work_path());
|
||||
// let watcher = ConfigWatcher::new(data_dir, app_state.clone());
|
||||
// let _handle = StdArc::new(watcher).spawn();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue