pub struct Run {Show 23 fields
pub run_id: String,
pub job_id: Option<String>,
pub script_name: String,
pub parent_run_id: Option<String>,
pub root_run_id: Option<String>,
pub child_index: Option<i32>,
pub scheduled_for: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
pub finished_at: Option<DateTime<Utc>>,
pub duration_ms: Option<i64>,
pub status: RunStatus,
pub attempt: i32,
pub instance_id: Option<String>,
pub placement_json: Option<Value>,
pub pool_id: Option<String>,
pub actor_json: Value,
pub params_json: Value,
pub stdout_text: Option<String>,
pub stderr_text: Option<String>,
pub error_json: Option<Value>,
pub stats_json: Option<Value>,
pub claimed_by: Option<String>,
pub claim_lease_until: Option<DateTime<Utc>>,
}Expand description
An execution instance of a scheduled job.
Fields§
§run_id: StringUnique identifier (UUID).
job_id: Option<String>Job that spawned this run (None for ad-hoc child runs).
script_name: StringScript being executed.
parent_run_id: Option<String>Parent run that spawned this run (for child runs).
root_run_id: Option<String>Root run in the lineage tree.
child_index: Option<i32>Index among siblings (for child runs).
scheduled_for: DateTime<Utc>When the run was scheduled to execute.
started_at: Option<DateTime<Utc>>When execution actually started.
finished_at: Option<DateTime<Utc>>When execution finished.
duration_ms: Option<i64>Execution duration in milliseconds.
status: RunStatusCurrent status of the run.
attempt: i32Retry attempt number (1 for first attempt).
instance_id: Option<String>Instance ID that executed this run.
placement_json: Option<Value>Placement information.
pool_id: Option<String>Target execution pool (distributed mode). None in DB means the "default" pool.
actor_json: ValueSerialized Actor for identity reconstruction.
params_json: ValueParameters passed to the script.
stdout_text: Option<String>Captured stdout from the script.
stderr_text: Option<String>Captured stderr from the script.
error_json: Option<Value>Error details if the run failed.
stats_json: Option<Value>Execution statistics.
claimed_by: Option<String>Worker instance id while status is claimed / renewed during execution.
claim_lease_until: Option<DateTime<Utc>>Worker lease expiry for reclaim / failover.
Implementations§
Source§impl Run
impl Run
Sourcepub fn new(script_name: impl Into<String>, scheduled_for: DateTime<Utc>) -> Run
pub fn new(script_name: impl Into<String>, scheduled_for: DateTime<Utc>) -> Run
Create a queued run with generated IDs and empty runtime fields.
The run starts in RunStatus::Queued. Timestamps, duration, and error
details are populated later by start, complete, or fail.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Run
impl<'de> Deserialize<'de> for Run
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Run, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Run, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Run
impl Serialize for Run
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Run
impl RefUnwindSafe for Run
impl Send for Run
impl Sync for Run
impl Unpin for Run
impl UnsafeUnpin for Run
impl UnwindSafe for Run
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more