pub struct Purge { /* private fields */ }Expand description
The purge kind. What a purge is, and — the part a gc has no equivalent of — what a purge has to give back when it ends, however it ends.
Trait Implementations§
Source§impl JobKind for Purge
impl JobKind for Purge
Source§fn key(order: &PurgeOrder) -> &str
fn key(order: &PurgeOrder) -> &str
Keyed by ACCOUNT, because both questions the queue answers are per account: “is one already running for this account” on enqueue, and “how is mine going” on status.
Source§fn settle(
&self,
order: &PurgeOrder,
outcome: Result<(), String>,
progress: &Progress,
) -> (JobState, Option<String>)
fn settle( &self, order: &PurgeOrder, outcome: Result<(), String>, progress: &Progress, ) -> (JobState, Option<String>)
The release, on every path.
Unconditional, and the runner reaches it after a success, after a
failure and after a panic — that is what JobKind::settle is for and
it is the whole reason the release is the queue’s job and not the
runner’s: a runner that returned early, failed, or blew up would each be
a different missed unlock, and “release it in the runner’s error path
too” is a rule that holds until the next early return somebody adds.
Source§fn shutdown_error(&self) -> String
fn shutdown_error(&self) -> String
Reported with gate_released: false on purpose: the caller has already
taken a lockout under this id and has to know that nothing is going to
take it off.
Source§fn spawn_error(&self, err: &dyn Display) -> String
fn spawn_error(&self, err: &dyn Display) -> String
No worker means the job will never run — and the account is already locked. Say both, on the job, rather than leave it QUEUED for ever.
Source§const NAME: &'static str = "purge"
const NAME: &'static str = "purge"
gc-7, purge-12,
mirror-3), the jera lane’s job kind (gc), and the noun in
every message this module writes — so an operator reading a stack dump
or a FAILED job knows what it was without a lookup.Source§type Order = PurgeOrder
type Order = PurgeOrder
JobKind::run minutes later. Read moreSource§type Report = PurgeReport
type Report = PurgeReport
Source§fn run(&self, order: &PurgeOrder, progress: &Progress) -> Result<(), String>
fn run(&self, order: &PurgeOrder, progress: &Progress) -> Result<(), String>
std::panic::catch_unwind. Read moreSource§const FINISHED_RETENTION: Duration = DEFAULT_FINISHED_RETENTION
const FINISHED_RETENTION: Duration = DEFAULT_FINISHED_RETENTION
Source§const FINISHED_KEPT: usize = DEFAULT_FINISHED_KEPT
const FINISHED_KEPT: usize = DEFAULT_FINISHED_KEPT
Auto Trait Implementations§
impl !RefUnwindSafe for Purge
impl !UnwindSafe for Purge
impl Freeze for Purge
impl Send for Purge
impl Sync for Purge
impl Unpin for Purge
impl UnsafeUnpin for Purge
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request