pub struct WorkerOptions {
pub queue: String,
pub poll_interval: Duration,
pub max_jobs: Option<u64>,
pub backoff_cap: Duration,
}Expand description
How a worker behaves.
Fields§
§queue: StringThe queue to work. One worker works one queue.
poll_interval: DurationHow long to wait after finding nothing.
max_jobs: Option<u64>Stop after this many attempts. None means run until shutdown; Some(1)
is queue:work --once.
backoff_cap: DurationThe ceiling on retry backoff.
Trait Implementations§
Source§impl Clone for WorkerOptions
impl Clone for WorkerOptions
Source§impl Debug for WorkerOptions
impl Debug for WorkerOptions
Auto Trait Implementations§
impl Freeze for WorkerOptions
impl RefUnwindSafe for WorkerOptions
impl Send for WorkerOptions
impl Sync for WorkerOptions
impl Unpin for WorkerOptions
impl UnsafeUnpin for WorkerOptions
impl UnwindSafe for WorkerOptions
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