fix: mark embedding server ready when already running
All checks were successful
BotServer CI/CD / build (push) Successful in 3m36s

Previously, ensure_llama_servers_running() would return early
when both LLM and embedding servers were already running, without
calling set_embedding_server_ready(true). This caused DriveMonitor
to skip KB indexing with 'Embedding server not yet marked ready'.

Fix: call set_embedding_server_ready(true) before returning early
when servers are already running.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-12 10:27:23 -03:00
parent 694fb91efe
commit 180bab0358

View file

@ -1,4 +1,5 @@
use crate::core::config::ConfigManager;
use crate::core::kb::embedding_generator::set_embedding_server_ready;
use crate::core::shared::memory_monitor::{log_jemalloc_stats, MemoryStats};
use crate::security::command_guard::SafeCommand;
use crate::core::shared::models::schema::bots::dsl::*;
@ -157,6 +158,9 @@ pub async fn ensure_llama_servers_running(
};
if llm_running && embedding_running {
info!("Both LLM and Embedding servers are already running");
if !embedding_model.is_empty() {
set_embedding_server_ready(true);
}
return Ok(());
}
let mut tasks = vec![];