pub struct CachePurgeJob {
pub tenant_slug: String,
pub urls: Vec<String>,
}Expand description
Drop the public-cache entries for urls on one tenant. Enqueued
after a page mutation commits. Retriable — a transient
backend hiccup is retried with backoff; a missing tenant
registration is fatal (a startup-wiring gap, not transient).
Fields§
§tenant_slug: String§urls: Vec<String>Trait Implementations§
Source§impl Clone for CachePurgeJob
impl Clone for CachePurgeJob
Source§impl Debug for CachePurgeJob
impl Debug for CachePurgeJob
Source§impl<'de> Deserialize<'de> for CachePurgeJob
impl<'de> Deserialize<'de> for CachePurgeJob
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Job for CachePurgeJob
impl Job for CachePurgeJob
Source§const NAME: &'static str = "rcms.cache_purge"
const NAME: &'static str = "rcms.cache_purge"
Stable identifier for this job kind. Routes payloads to handlers.
Source§fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run the job. Return
Ok(()) on success, Err(Retryable(_)) to
retry with backoff, Err(Fatal(_)) to dead-letter at once. Read moreSource§const MAX_ATTEMPTS: u32 = 5
const MAX_ATTEMPTS: u32 = 5
Cap on total runs, not extra retries. The default of 5 is
one run plus four retries; 3 gives two retries. 0 counts as 1.
Source§fn retry_backoff(failed_attempt: u32) -> Duration
fn retry_backoff(failed_attempt: u32) -> Duration
Wait before the retry after run
failed_attempt (0 is the first
run). The default is 1s doubling; override it to ride out longer outages.Source§fn max_attempts(&self) -> u32
fn max_attempts(&self) -> u32
Self::MAX_ATTEMPTS for this job, read at dispatch. Override it
to set the cap per job from its payload.Source§fn retry_delay(&self, failed_attempt: u32) -> Duration
fn retry_delay(&self, failed_attempt: u32) -> Duration
Self::retry_backoff for this job. Override it to set the wait
per job from its payload.Auto Trait Implementations§
impl Freeze for CachePurgeJob
impl RefUnwindSafe for CachePurgeJob
impl Send for CachePurgeJob
impl Sync for CachePurgeJob
impl Unpin for CachePurgeJob
impl UnsafeUnpin for CachePurgeJob
impl UnwindSafe for CachePurgeJob
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.