pub struct QueueConfig {
pub db_path: Option<PathBuf>,
pub worker_id: String,
pub cooldown: Duration,
pub max_consecutive: u32,
pub poll_interval: Duration,
pub heartbeat_interval: Duration,
pub stale_after: Duration,
pub max_retries: u32,
}Expand description
Configuration for the queue system.
Use QueueConfig::builder() for ergonomic construction, or
QueueConfig::default() for sensible defaults (in-memory DB, no cooldown).
Fields§
§db_path: Option<PathBuf>Path to SQLite database file. None = in-memory database.
worker_id: StringStable worker identifier used for leases, heartbeats, and diagnostics.
cooldown: DurationCooldown duration between job executions (0 = no cooldown).
max_consecutive: u32Maximum consecutive jobs before a forced cooldown (0 = unlimited).
poll_interval: DurationPolling interval for checking pending jobs.
heartbeat_interval: DurationInterval between lease heartbeats while a job is running.
stale_after: DurationVisibility timeout / stale lease threshold for reclaiming jobs.
max_retries: u32Maximum retry attempts for retryable failures.
Implementations§
Source§impl QueueConfig
impl QueueConfig
Sourcepub fn builder() -> QueueConfigBuilder
pub fn builder() -> QueueConfigBuilder
Start building a config with the builder pattern.
Trait Implementations§
Source§impl Clone for QueueConfig
impl Clone for QueueConfig
Source§fn clone(&self) -> QueueConfig
fn clone(&self) -> QueueConfig
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 QueueConfig
impl Debug for QueueConfig
Source§impl Default for QueueConfig
impl Default for QueueConfig
Source§fn default() -> QueueConfig
fn default() -> QueueConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueueConfig
impl RefUnwindSafe for QueueConfig
impl Send for QueueConfig
impl Sync for QueueConfig
impl Unpin for QueueConfig
impl UnsafeUnpin for QueueConfig
impl UnwindSafe for QueueConfig
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