improve logging
All checks were successful
/ upload (release) Successful in 1m42s

This commit is contained in:
pavel 2026-02-11 01:55:13 +01:00
commit b9c6c831c1
3 changed files with 36 additions and 12 deletions

View file

@ -68,6 +68,8 @@ pub async fn create_task(
}
let task_id = Uuid::new_v4();
tracing::info!(%task_id, goal = %payload.goal, "Creating new task");
let new_task = crate::entities::task::ActiveModel {
id: sea_orm::Set(task_id),
goal: sea_orm::Set(payload.goal),
@ -95,6 +97,8 @@ pub async fn rerun_task(
.await?
.ok_or_else(|| crate::error::AppError::NotFound("Task not found".to_string()))?;
tracing::info!(task_id = %task.id, "Manually triggering task rerun");
tasks::execute_agent_run(
&state.db,
&state.scheduler,
@ -132,6 +136,8 @@ pub async fn update_task(
.into();
let mut task = task;
tracing::info!(task_id = %id, goal = %payload.goal, "Updating task");
task.goal = sea_orm::Set(payload.goal);
task.cron = sea_orm::Set(payload.cron.clone());