pub struct Progress {
pub stage: Stage,
pub from: String,
pub to: Option<String>,
pub parked_run: Option<String>,
pub started_at: Timestamp,
pub updated_at: Timestamp,
pub detail: Option<String>,
}Expand description
One upgrade’s progress, persisted at progress_path.
Kept on disk rather than in memory because the process that finishes an
upgrade is never the one that started it: the successor is a fresh binary
(see web::spawn_successor), and the only thing the two share is the
disk. Beside the run history rather than under the cache dir alongside
[state_path]: this is not throttle bookkeeping, it is the record of one
upgrade the operator asked for, and - like a parked run - it is meant to
outlive the process that wrote it.
Fields§
§stage: StageWhere this upgrade has gotten to.
from: StringVersion this upgrade started from.
to: Option<String>Version it is replacing itself with.
parked_run: Option<String>The run Stage::Parking is waiting on, when one was in flight.
started_at: TimestampWhen this upgrade was asked for.
updated_at: TimestampLast time stage changed.
detail: Option<String>Why Stage::Failed happened; None for every other stage.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Progress
impl<'de> Deserialize<'de> for Progress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnsafeUnpin for Progress
impl UnwindSafe for Progress
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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