pub struct QueueConfigBuilder { /* private fields */ }Expand description
Builder for QueueConfig.
Implementations§
Source§impl QueueConfigBuilder
impl QueueConfigBuilder
Sourcepub fn with_db_path(self, path: PathBuf) -> Self
pub fn with_db_path(self, path: PathBuf) -> Self
Set the SQLite database path for persistence. Omit for in-memory.
Sourcepub fn with_worker_id(self, worker_id: impl Into<String>) -> Self
pub fn with_worker_id(self, worker_id: impl Into<String>) -> Self
Set the worker identifier used for job leases and heartbeats.
Sourcepub fn with_cooldown(self, duration: Duration) -> Self
pub fn with_cooldown(self, duration: Duration) -> Self
Set the cooldown duration between consecutive job executions.
Sourcepub fn with_max_consecutive(self, max: u32) -> Self
pub fn with_max_consecutive(self, max: u32) -> Self
Set the maximum consecutive jobs before a forced cooldown.
Sourcepub fn with_poll_interval(self, interval: Duration) -> Self
pub fn with_poll_interval(self, interval: Duration) -> Self
Set the polling interval for checking pending jobs.
Sourcepub fn with_heartbeat_interval(self, interval: Duration) -> Self
pub fn with_heartbeat_interval(self, interval: Duration) -> Self
Set the heartbeat interval for running jobs.
Sourcepub fn with_stale_after(self, duration: Duration) -> Self
pub fn with_stale_after(self, duration: Duration) -> Self
Set the stale lease threshold for reclaiming abandoned jobs.
Sourcepub fn with_max_retries(self, max_retries: u32) -> Self
pub fn with_max_retries(self, max_retries: u32) -> Self
Set the maximum retry attempts for retryable failures.
Sourcepub fn build(self) -> QueueConfig
pub fn build(self) -> QueueConfig
Build the final QueueConfig.
Trait Implementations§
Source§impl Default for QueueConfigBuilder
impl Default for QueueConfigBuilder
Source§fn default() -> QueueConfigBuilder
fn default() -> QueueConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueueConfigBuilder
impl RefUnwindSafe for QueueConfigBuilder
impl Send for QueueConfigBuilder
impl Sync for QueueConfigBuilder
impl Unpin for QueueConfigBuilder
impl UnsafeUnpin for QueueConfigBuilder
impl UnwindSafe for QueueConfigBuilder
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