Skip to main content

TaskStateRepository

Trait TaskStateRepository 

Source
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§

Source

fn set_task_status( &self, task_id: &str, status: &str, set_completed: bool, ) -> Result<()>

Updates the task status and optionally stamps completion metadata.

Source

fn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>

Prepares a task for a fresh start by resetting batch-execution state.

Source

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.

Source

fn update_task_pipeline_vars( &self, task_id: &str, pipeline_vars_json: &str, ) -> Result<()>

Persists the serialized pipeline-variable map for a task.

Source

fn delete_task_and_collect_log_paths( &self, task_id: &str, ) -> Result<Vec<String>>

Deletes a task and returns log paths that should be cleaned up afterward.

Implementors§