fix: remove LLM streaming lock that caused deadlocks
All checks were successful
BotServer CI/CD / build (push) Successful in 3m40s
All checks were successful
BotServer CI/CD / build (push) Successful in 3m40s
This commit is contained in:
parent
7d911194f3
commit
6468588f58
2 changed files with 14 additions and 13 deletions
|
|
@ -10,7 +10,7 @@ use tool_executor::ToolExecutor;
|
||||||
use crate::core::config::ConfigManager;
|
use crate::core::config::ConfigManager;
|
||||||
|
|
||||||
#[cfg(feature = "drive")]
|
#[cfg(feature = "drive")]
|
||||||
use crate::drive::drive_monitor::{DriveMonitor, set_llm_streaming};
|
use crate::drive::drive_monitor::{DriveMonitor};
|
||||||
#[cfg(feature = "llm")]
|
#[cfg(feature = "llm")]
|
||||||
use crate::llm::llm_models;
|
use crate::llm::llm_models;
|
||||||
#[cfg(feature = "llm")]
|
#[cfg(feature = "llm")]
|
||||||
|
|
@ -811,9 +811,9 @@ impl BotOrchestrator {
|
||||||
// Clone messages for the async task
|
// Clone messages for the async task
|
||||||
let messages_clone = messages.clone();
|
let messages_clone = messages.clone();
|
||||||
|
|
||||||
// Set flag to prevent DriveMonitor PDF downloads during LLM streaming
|
// REMOVED: LLM streaming lock was causing deadlocks
|
||||||
#[cfg(feature = "drive")]
|
// #[cfg(feature = "drive")]
|
||||||
set_llm_streaming(true);
|
// set_llm_streaming(true);
|
||||||
|
|
||||||
let stream_tx_clone = stream_tx.clone();
|
let stream_tx_clone = stream_tx.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
|
@ -823,8 +823,9 @@ impl BotOrchestrator {
|
||||||
{
|
{
|
||||||
error!("LLM streaming error: {}", e);
|
error!("LLM streaming error: {}", e);
|
||||||
}
|
}
|
||||||
#[cfg(feature = "drive")]
|
// REMOVED: LLM streaming lock was causing deadlocks
|
||||||
set_llm_streaming(false);
|
// #[cfg(feature = "drive")]
|
||||||
|
// set_llm_streaming(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut full_response = String::new();
|
let mut full_response = String::new();
|
||||||
|
|
|
||||||
|
|
@ -1685,13 +1685,13 @@ let file_state = FileState {
|
||||||
files_processed += 1;
|
files_processed += 1;
|
||||||
debug!("[GBKB] Queue size: {}/10", files_to_process.len());
|
debug!("[GBKB] Queue size: {}/10", files_to_process.len());
|
||||||
|
|
||||||
// Skip downloads if LLM is actively streaming to prevent deadlock
|
// REMOVED: Skip downloads if LLM is actively streaming - was causing deadlocks
|
||||||
#[cfg(any(feature = "research", feature = "llm"))]
|
// #[cfg(any(feature = "research", feature = "llm"))]
|
||||||
if is_llm_streaming() {
|
// if is_llm_streaming() {
|
||||||
debug!("[GBKB] Skipping download - LLM is streaming, will retry later");
|
// debug!("[GBKB] Skipping download - LLM is streaming, will retry later");
|
||||||
files_to_process.clear();
|
// files_to_process.clear();
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if files_to_process.len() >= 10 {
|
if files_to_process.len() >= 10 {
|
||||||
debug!("[GBKB] Downloading batch of {} files", files_to_process.len());
|
debug!("[GBKB] Downloading batch of {} files", files_to_process.len());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue