pub struct ReferenceIndexJob {
pub tenant_slug: String,
pub page_id: i64,
pub refs: Vec<OwnedRef>,
}Expand description
Rebuild a page’s outbound reference rows. Carries the
already-scanned refs in its payload, so run() only needs the
tenant pool (resolved from the registry) to replace the rows —
retriable if that write hits a transient error.
Fields§
§tenant_slug: String§page_id: i64§refs: Vec<OwnedRef>Trait Implementations§
Source§impl Clone for ReferenceIndexJob
impl Clone for ReferenceIndexJob
Source§impl Debug for ReferenceIndexJob
impl Debug for ReferenceIndexJob
Source§impl<'de> Deserialize<'de> for ReferenceIndexJob
impl<'de> Deserialize<'de> for ReferenceIndexJob
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 ReferenceIndexJob
impl Job for ReferenceIndexJob
Source§const NAME: &'static str = "rcms.reference_index"
const NAME: &'static str = "rcms.reference_index"
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.Auto Trait Implementations§
impl Freeze for ReferenceIndexJob
impl RefUnwindSafe for ReferenceIndexJob
impl Send for ReferenceIndexJob
impl Sync for ReferenceIndexJob
impl Unpin for ReferenceIndexJob
impl UnsafeUnpin for ReferenceIndexJob
impl UnwindSafe for ReferenceIndexJob
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.