botserver/build.rs
Rodrigo Rodriguez (Pragmatismo) d20ecdb89c
Some checks failed
BotServer CI/CD / build (push) Failing after 6s
fix: enterprise-grade reliability — three changes
1. CI: restart system container instead of just systemctl restart botserver
   — ensures full env reload, Vault re-auth, DriveMonitor fresh state

2. Health endpoint: add 'commit' field with short git SHA
   — build.rs passes BOTSERVER_COMMIT from CI via rustc-env
   - Both /health and /api/health now report the running commit

3. WebSocket recv_task: spawn stream_response in separate tokio task
   - prevents one hung LLM from freezing all message processing
   - each WebSocket connection can now handle multiple messages
     concurrently regardless of LLM latency

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 09:51:54 -03:00

15 lines
576 B
Rust

fn main() {
if std::path::Path::new("../botui/ui/suite/").exists() {
println!("cargo:rerun-if-changed=../botui/ui/suite/");
}
println!("cargo:rerun-if-changed=3rdparty.toml");
println!("cargo:rerun-if-changed=.env.embedded");
// Pass build metadata to the binary via option_env!
if let Ok(date) = std::env::var("BOTSERVER_BUILD_DATE") {
println!("cargo:rustc-env=BOTSERVER_BUILD_DATE={}", date);
}
if let Ok(commit) = std::env::var("BOTSERVER_COMMIT") {
println!("cargo:rustc-env=BOTSERVER_COMMIT={}", commit);
}
}