- Testing ON keyword.
Some checks failed
GBCI / build (push) Failing after 29m55s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-08-16 20:40:20 -03:00
parent 0a009f9789
commit 18c9199b79
5 changed files with 8 additions and 39 deletions

View file

@ -62,7 +62,7 @@ async fn main() -> std::io::Result<()> {
// Start automation service in background
let automation_state = app_state.get_ref().clone(); // This gets the Arc<AppState>
let automation = AutomationService::new(automation_state, "../../src/scripts");
let automation = AutomationService::new(automation_state, "src/prompts");
let _automation_handle = automation.spawn();
// Start HTTP server

View file

@ -1,8 +1,8 @@
export container="pragmatismo-doc-editor"
export container="pragmatismo-system"
lxc stop "$container"
lxc config device override "$container" root size=5GB
lxc config device set "$container" root size=5GB
lxc config device override "$container" root size=10GB
lxc config device set "$container" root size=10GB
lxc start "$container"
ROOT_DEV=$(lxc exec "$container" -- df / --output=source | tail -1)

View file

@ -64,7 +64,7 @@ impl AutomationService {
}
async fn check_table_changes(&self, automations: &[Automation], since: DateTime<Utc>) {
if let Some(pool) = &self.state.db {
if let Some(pool) = &self.state.db_custom {
for automation in automations {
if let Some(trigger_kind) = TriggerKind::from_i32(automation.kind) {
if matches!(

View file

@ -10,7 +10,7 @@ pub fn set_schedule_keyword(state: &AppState, engine: &mut Engine) {
let db = state.db_custom.clone();
engine
.register_custom_syntax(["SET", "SCHEDULE", "$string$"], true, {
.register_custom_syntax(["SET_SCHEDULE", "$string$"], true, {
let db = db.clone();
move |context, inputs| {

View file

@ -237,37 +237,6 @@ fn messages_to_prompt(messages: &[ChatMessage]) -> String {
prompt
}
// Cleanup function
pub fn cleanup_processes() {
println!("🧹 Cleaning up llama.cpp processes...");
unsafe {
if let Some(process_handle) = &LLAMA_PROCESS {
if let Ok(mut process) = process_handle.lock() {
if let Some(ref mut child) = *process {
println!("🔪 Killing llama server process...");
let _ = child.start_kill();
}
}
}
}
// Kill any remaining llama processes
println!("🔍 Killing any remaining llama-server processes...");
let output = Command::new("pkill").arg("-f").arg("llama-server").output();
match output {
Ok(result) => {
if result.status.success() {
println!("✅ Successfully killed llama processes");
} else {
println!(" No llama processes found to kill");
}
}
Err(e) => println!("⚠️ Error trying to kill processes: {}", e),
}
}
// Proxy endpoint
#[post("/v1/chat/completions")]
pub async fn chat_completions(