pub struct ProcessExecutor {
pub setup: WorkerSetup,
pub parse: ParseLimits,
pub metrics: AgentMetrics,
pub drain_terminate_period: Duration,
pub forks: Option<ForkServers>,
pub watchers: WatcherHosts,
pub secrets: Arc<SecretStores>,
pub running_memory: RunningMemory,
}Expand description
Runs attempts and parse jobs as processes.
Fields§
§setup: WorkerSetupHow tasks run here.
parse: ParseLimitsHow long one file may take to import, and how many are parsed at once.
metrics: AgentMetricsWhere the watchdog’s kills are counted.
drain_terminate_period: DurationFrom an interrupted task’s SIGTERM to its SIGKILL ([worker] drain_terminate_period).
forks: Option<ForkServers>The DAG interpreter’s fork servers, when it has them (fork_server = true, Linux).
watchers: WatcherHostsThe hosts running this worker’s wait steps.
secrets: Arc<SecretStores>The worker’s secret storages.
running_memory: RunningMemoryIts running tasks’ memory, for the heartbeat (decision 463).
Trait Implementations§
Source§impl Clone for ProcessExecutor
impl Clone for ProcessExecutor
Source§fn clone(&self) -> ProcessExecutor
fn clone(&self) -> ProcessExecutor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcessExecutor
impl Debug for ProcessExecutor
Source§impl Executor for ProcessExecutor
impl Executor for ProcessExecutor
Source§fn code_changed(&self, copies: BTreeMap<String, PathBuf>)
fn code_changed(&self, copies: BTreeMap<String, PathBuf>)
Source§fn code_in_use(&self) -> Vec<String>
fn code_in_use(&self) -> Vec<String>
Source§fn watcher_hosts(&self) -> Vec<WatcherHost>
fn watcher_hosts(&self) -> Vec<WatcherHost>
Source§fn memory_parts(&self) -> (u64, Vec<TaskMemory>)
fn memory_parts(&self) -> (u64, Vec<TaskMemory>)
Source§fn warnings(&self) -> Receiver<Vec<WorkerWarning>>
fn warnings(&self) -> Receiver<Vec<WorkerWarning>>
Source§async fn run(
&self,
spec: AttemptSpec,
plan: Plan,
stop: Stops,
spawned: Spawned,
ended: TaskEnded,
) -> Finished
async fn run( &self, spec: AttemptSpec, plan: Plan, stop: Stops, spawned: Spawned, ended: TaskEnded, ) -> Finished
stop says why to stop it (a later reason
may hurry a stop under way, see crate::supervise::supervise), telling spawned its
process, and ended the task’s result before its cleanup starts; returns its
Finished.Source§async fn cleanup(
&self,
spec: AttemptSpec,
ended: Finished,
handles: Vec<CleanupHandle>,
spawned: Spawned,
) -> Finished
async fn cleanup( &self, spec: AttemptSpec, ended: Finished, handles: Vec<CleanupHandle>, spawned: Spawned, ) -> Finished
ended, with
the handles the journal kept; returns ended with the cleanup’s result.Source§async fn connection_job(
&self,
job: ConnectionJob,
spawned: Spawned,
) -> Vec<ConnectionReport>
async fn connection_job( &self, job: ConnectionJob, spawned: Spawned, ) -> Vec<ConnectionReport>
schedr connections check / test); a
report for each. An executor without secrets says it can’t.
A test tells spawned its process, as an attempt does (the journal records it, so
a worker killed meanwhile stops it when it starts again).Auto Trait Implementations§
impl !RefUnwindSafe for ProcessExecutor
impl !UnwindSafe for ProcessExecutor
impl Freeze for ProcessExecutor
impl Send for ProcessExecutor
impl Sync for ProcessExecutor
impl Unpin for ProcessExecutor
impl UnsafeUnpin for ProcessExecutor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);