#[non_exhaustive]pub enum JobOutcome {
Created,
Existing,
Conflict,
InsufficientStorage,
NotGranted,
LimitsNotApplied,
LimitAboveCeiling,
}Expand description
What a job’s last attempt came to: the five results a job reports;
limits_not_applied when the runner could not verify the
container’s limits and killed it; and limit_above_ceiling when the
job was never launched because its application’s manifest asks for
a limit above a ceiling lowered since the approval.
§Examples
use stratum_node_core::JobOutcome;
assert_eq!(JobOutcome::InsufficientStorage.as_str(), "insufficient_storage");
assert!(!JobOutcome::LimitsNotApplied.is_reportable());
assert!(!JobOutcome::LimitAboveCeiling.is_reportable());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Created
The job created its result.
Existing
The period’s result already existed and names this installation and period.
Conflict
A resource at the result path does not match.
InsufficientStorage
The pod refused the write with 507.
NotGranted
The pod server refused with an empty 403: the grant is missing or narrower than the manifest.
LimitsNotApplied
The runner killed the container because its cgroup limits were missing or different.
LimitAboveCeiling
The controller failed the job without launching it: its application’s manifest asks for a limit above the node’s current ceiling (the ceiling was lowered after the approval).
Implementations§
Source§impl JobOutcome
impl JobOutcome
Source§impl JobOutcome
impl JobOutcome
Sourcepub fn is_reportable(self) -> bool
pub fn is_reportable(self) -> bool
Returns true for the outcomes a job may report itself, every one
but limits_not_applied and limit_above_ceiling, which only the
controller records.