pub trait CommandRunRepository {
// Required methods
fn insert_command_run(&self, run: &NewCommandRun) -> Result<()>;
fn update_command_run(&self, run: &NewCommandRun) -> Result<()>;
fn update_command_run_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>;
fn persist_phase_result_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>;
fn update_command_run_pid(&self, run_id: &str, pid: i64) -> Result<()>;
fn list_task_log_runs(
&self,
task_id: &str,
limit: usize,
) -> Result<Vec<TaskLogRunRow>>;
fn find_active_child_pids(&self, task_id: &str) -> Result<Vec<i64>>;
fn find_inflight_command_runs_for_task(
&self,
task_id: &str,
) -> Result<Vec<InflightRunRecord>>;
fn find_completed_runs_for_pending_items(
&self,
task_id: &str,
) -> Result<Vec<CompletedRunRecord>>;
}Expand description
Command run recording and process tracking.
Required Methods§
Sourcefn insert_command_run(&self, run: &NewCommandRun) -> Result<()>
fn insert_command_run(&self, run: &NewCommandRun) -> Result<()>
Inserts a command-run record.
Sourcefn update_command_run(&self, run: &NewCommandRun) -> Result<()>
fn update_command_run(&self, run: &NewCommandRun) -> Result<()>
Updates an existing command-run record.
Sourcefn update_command_run_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>
fn update_command_run_with_events( &self, run: &NewCommandRun, events: &[DbEventRecord], ) -> Result<()>
Updates a command run and appends events in a single repository call.
Sourcefn persist_phase_result_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>
fn persist_phase_result_with_events( &self, run: &NewCommandRun, events: &[DbEventRecord], ) -> Result<()>
Persists a completed phase result together with its emitted events.
Sourcefn update_command_run_pid(&self, run_id: &str, pid: i64) -> Result<()>
fn update_command_run_pid(&self, run_id: &str, pid: i64) -> Result<()>
Updates the operating-system PID associated with a running command.
Sourcefn list_task_log_runs(
&self,
task_id: &str,
limit: usize,
) -> Result<Vec<TaskLogRunRow>>
fn list_task_log_runs( &self, task_id: &str, limit: usize, ) -> Result<Vec<TaskLogRunRow>>
Lists recent command runs for log streaming or inspection.
Sourcefn find_active_child_pids(&self, task_id: &str) -> Result<Vec<i64>>
fn find_active_child_pids(&self, task_id: &str) -> Result<Vec<i64>>
Returns active child PIDs for a task.
Sourcefn find_inflight_command_runs_for_task(
&self,
task_id: &str,
) -> Result<Vec<InflightRunRecord>>
fn find_inflight_command_runs_for_task( &self, task_id: &str, ) -> Result<Vec<InflightRunRecord>>
Returns in-flight command runs for a task (FR-038).
Sourcefn find_completed_runs_for_pending_items(
&self,
task_id: &str,
) -> Result<Vec<CompletedRunRecord>>
fn find_completed_runs_for_pending_items( &self, task_id: &str, ) -> Result<Vec<CompletedRunRecord>>
Returns completed runs whose parent items are still pending (FR-038).