pub struct StoredRunnerContext {
pub runner_cls: String,
pub runner_id: String,
pub pid: u32,
pub hostname: String,
pub thread_id: u64,
pub started_at: DateTime<Utc>,
pub parent_runner_id: Option<String>,
pub parent_runner_cls: Option<String>,
}Expand description
Runner execution context — metadata about the environment running an invocation.
Mirrors pynenc’s RunnerContext: captures runner type, PID, hostname,
thread ID, and optional parent context for hierarchical runner relationships
(e.g., PersistentProcessRunner → PPRWorker).
Named StoredRunnerContext to distinguish from context::RunnerContext (the
runtime task-local context used during invocation execution).
Fields§
§runner_cls: StringClass/type name of the runner (e.g. “TaskRunner”, “PPRWorker”).
runner_id: StringUnique identifier for this runner instance.
pid: u32§hostname: String§thread_id: u64§started_at: DateTime<Utc>§parent_runner_id: Option<String>Parent runner ID, if this is a child worker.
parent_runner_cls: Option<String>Parent runner class name.
Implementations§
Source§impl StoredRunnerContext
impl StoredRunnerContext
pub fn current( runner_id: impl Into<String>, runner_cls: impl Into<String>, ) -> Self
Sourcepub fn new_child(
&self,
child_runner_id: impl Into<String>,
child_runner_cls: impl Into<String>,
) -> Self
pub fn new_child( &self, child_runner_id: impl Into<String>, child_runner_cls: impl Into<String>, ) -> Self
Create a child runner context with this context as parent.
Sourcepub fn from_runtime(ctx: &RunnerContext) -> Self
pub fn from_runtime(ctx: &RunnerContext) -> Self
Convert a runtime RunnerContext into a StoredRunnerContext.
Maps the runtime context (used in task-local/thread-local storage) to the persistent format stored in the state backend for monitoring.
Trait Implementations§
Source§impl Clone for StoredRunnerContext
impl Clone for StoredRunnerContext
Source§fn clone(&self) -> StoredRunnerContext
fn clone(&self) -> StoredRunnerContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more