Skip to main content

RunStore

Struct RunStore 

Source
pub struct RunStore { /* private fields */ }

Implementations§

Source§

impl RunStore

Source

pub fn insert_claimed_run( &self, claim: &RunAdmission<'_>, now_ms: i64, ) -> Result<AdmittedRun, StoreError>

Source

pub fn notes_for_run(&self, run_id: &str) -> Result<Vec<String>, StoreError>

Source§

impl RunStore

Source

pub fn from_db(db: Db) -> Self

Source

pub fn settle( &self, run_id: &str, exit_code: Option<i32>, outcome: Outcome, records: &[EvidenceRecord], cooldown: Option<&CooldownUpdate<'_>>, now_ms: i64, ) -> Result<(RecordedOutcome, bool), StoreError>

Source

pub fn abort( &self, run_id: &str, ticket_id: &str, now_ms: i64, ) -> Result<bool, StoreError>

Source

pub fn begin( &self, run_id: &str, branch: &str, worktree_path: &str, now_ms: i64, ) -> Result<Start, StoreError>

Hands a claimed run to its driver, recording the workspace every stage will execute in. This is the run’s start: the activity feed says so here, once, whatever kind of stage the flow opens with.

Source

pub fn start( &self, start: &RunStart<'_>, now_ms: i64, ) -> Result<Start, StoreError>

Records the agent process an agent stage launched. The run is already under way; this only says which process the daemon is now supervising.

Source

pub fn release_agent( &self, run_id: &str, now_ms: i64, ) -> Result<Exit, StoreError>

Returns a run to its driver after an agent stage that is not the run’s own attempt at its ticket. The exit code, commits, and vendor reading on the run belong to the first agent stage alone, so none of them move here; only ownership of the walk does.

Source

pub fn record_exit( &self, exit: &RunExit<'_>, now_ms: i64, ) -> Result<Exit, StoreError>

Checkpoints an agent exit, granting one caller ownership of the walk.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.