pub struct DocketSettings {
pub backend: DocketBackendType,
pub queue_prefix: String,
pub visibility_timeout: Duration,
pub default_task_timeout: Duration,
pub max_retries: u32,
pub retry_delay: Duration,
pub poll_interval: Duration,
}Expand description
Settings for configuring a Docket instance.
Fields§
§backend: DocketBackendTypeBackend type (memory or redis).
queue_prefix: StringQueue name prefix for namespacing.
visibility_timeout: DurationTask visibility timeout (how long before unacked task is requeued).
default_task_timeout: DurationDefault task timeout.
max_retries: u32Maximum retry count for failed tasks.
retry_delay: DurationDelay between retries (with exponential backoff).
poll_interval: DurationWorker poll interval when queue is empty.
Implementations§
Source§impl DocketSettings
impl DocketSettings
Sourcepub fn with_queue_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_queue_prefix(self, prefix: impl Into<String>) -> Self
Sets the queue prefix.
Sourcepub fn with_visibility_timeout(self, timeout: Duration) -> Self
pub fn with_visibility_timeout(self, timeout: Duration) -> Self
Sets the visibility timeout.
Sourcepub fn with_max_retries(self, retries: u32) -> Self
pub fn with_max_retries(self, retries: u32) -> Self
Sets the maximum retry count.
Sourcepub fn with_poll_interval(self, interval: Duration) -> Self
pub fn with_poll_interval(self, interval: Duration) -> Self
Sets the poll interval.
Trait Implementations§
Source§impl Clone for DocketSettings
impl Clone for DocketSettings
Source§fn clone(&self) -> DocketSettings
fn clone(&self) -> DocketSettings
Returns a duplicate of the value. Read more
1.0.0 · 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 DocketSettings
impl Debug for DocketSettings
Auto Trait Implementations§
impl Freeze for DocketSettings
impl RefUnwindSafe for DocketSettings
impl Send for DocketSettings
impl Sync for DocketSettings
impl Unpin for DocketSettings
impl UnwindSafe for DocketSettings
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).