pub trait TaskStateRepository {
// Required methods
fn set_task_status(
&self,
task_id: &str,
status: &str,
set_completed: bool,
) -> Result<()>;
fn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>;
fn update_task_cycle_state(
&self,
task_id: &str,
current_cycle: u32,
init_done: bool,
) -> Result<()>;
fn update_task_pipeline_vars(
&self,
task_id: &str,
pipeline_vars_json: &str,
) -> Result<()>;
fn delete_task_and_collect_log_paths(
&self,
task_id: &str,
) -> Result<Vec<String>>;
}Expand description
Task lifecycle state mutations.
Required Methods§
Sourcefn set_task_status(
&self,
task_id: &str,
status: &str,
set_completed: bool,
) -> Result<()>
fn set_task_status( &self, task_id: &str, status: &str, set_completed: bool, ) -> Result<()>
Updates the task status and optionally stamps completion metadata.
Sourcefn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>
fn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>
Prepares a task for a fresh start by resetting batch-execution state.
Sourcefn update_task_cycle_state(
&self,
task_id: &str,
current_cycle: u32,
init_done: bool,
) -> Result<()>
fn update_task_cycle_state( &self, task_id: &str, current_cycle: u32, init_done: bool, ) -> Result<()>
Persists cycle counters and init_once completion state for a task.