From 99bd94b6dfcf475f11780d8ad40dddbb3e1e4ec0 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Fri, 20 Jun 2025 16:52:52 +0100 Subject: [PATCH] Task attempt f812fa5b-e9d6-4a9a-99f9-b1243f01c462 - Final changes --- backend/src/models/task_attempt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/models/task_attempt.rs b/backend/src/models/task_attempt.rs index 26d3b506..132b71f5 100644 --- a/backend/src/models/task_attempt.rs +++ b/backend/src/models/task_attempt.rs @@ -470,6 +470,9 @@ impl TaskAttempt { .await? .ok_or(TaskAttemptError::ProjectNotFound)?; + // Update task status to InProgress at the start of execution (during setup) + Task::update_status(pool, task_id, project_id, TaskStatus::InProgress).await?; + // Step 1: Run setup script if it exists if let Some(setup_script) = &project.setup_script { if !setup_script.trim().is_empty() { @@ -596,9 +599,6 @@ impl TaskAttempt { ); } - // Update task status to InProgress - Task::update_status(pool, task_id, project_id, TaskStatus::InProgress).await?; - tracing::info!( "Started execution {} for task attempt {}", execution_id,