pub struct WorkerRecoveryConfig {
pub heartbeat_interval: Duration,
pub sweep_interval: Duration,
pub sweep_threshold: Duration,
pub recovery_delay: Duration,
pub resilient_sweep_threshold_multiplier: u32,
pub resilient_job_flags: Vec<String>,
pub enabled: bool,
}Expand description
Dead worker recovery configuration.
Timing options align with Graphile Worker Pro:
heartbeat_interval—heartbeatIntervalsweep_interval—sweepIntervalsweep_threshold—sweepThreshold
Fields§
§heartbeat_interval: DurationWorker check-in frequency (heartbeatInterval).
sweep_interval: DurationInactive worker check frequency (sweepInterval).
sweep_threshold: DurationTime since last heartbeat before a worker is deemed inactive (sweepThreshold).
recovery_delay: DurationDelay before jobs recovered from dead workers are eligible to run again.
resilient_sweep_threshold_multiplier: u32Multiplier applied to sweep_threshold when a worker holds jobs with resilient flags.
resilient_job_flags: Vec<String>Job flags that trigger the extended sweep threshold.
enabled: boolWhether heartbeat registration and sweeping are enabled.
Implementations§
Source§impl WorkerRecoveryConfig
impl WorkerRecoveryConfig
pub fn heartbeat_interval(self, value: Duration) -> WorkerRecoveryConfig
pub fn sweep_interval(self, value: Duration) -> WorkerRecoveryConfig
pub fn sweep_threshold(self, value: Duration) -> WorkerRecoveryConfig
pub fn recovery_delay(self, value: Duration) -> WorkerRecoveryConfig
pub fn resilient_sweep_threshold_multiplier( self, value: u32, ) -> WorkerRecoveryConfig
pub fn resilient_job_flags(self, flags: Vec<String>) -> WorkerRecoveryConfig
pub fn enabled(self, value: bool) -> WorkerRecoveryConfig
Trait Implementations§
Source§impl Clone for WorkerRecoveryConfig
impl Clone for WorkerRecoveryConfig
Source§fn clone(&self) -> WorkerRecoveryConfig
fn clone(&self) -> WorkerRecoveryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerRecoveryConfig
impl Debug for WorkerRecoveryConfig
Source§impl Default for WorkerRecoveryConfig
impl Default for WorkerRecoveryConfig
Source§fn default() -> WorkerRecoveryConfig
fn default() -> WorkerRecoveryConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkerRecoveryConfig
impl RefUnwindSafe for WorkerRecoveryConfig
impl Send for WorkerRecoveryConfig
impl Sync for WorkerRecoveryConfig
impl Unpin for WorkerRecoveryConfig
impl UnsafeUnpin for WorkerRecoveryConfig
impl UnwindSafe for WorkerRecoveryConfig
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,
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 more