Struct apalis_core::storage::builder::WorkerConfig
source · pub struct WorkerConfig { /* private fields */ }Available on crate feature
storage only.Expand description
Allows configuring of how storages are consumed
Implementations§
source§impl WorkerConfig
impl WorkerConfig
sourcepub fn buffer_size(self, buffer_size: usize) -> Self
pub fn buffer_size(self, buffer_size: usize) -> Self
The number of jobs to fetch in one poll
Defaults to 1
sourcepub fn enqueue_scheduled(self, interval: Option<(i32, Duration)>) -> Self
pub fn enqueue_scheduled(self, interval: Option<(i32, Duration)>) -> Self
The rate at which jobs in the scheduled queue are pushed into the active queue
Can be set to none for sql scenarios as sql uses run_at This mainly applies for redis currently
sourcepub fn reenqueue_orphaned(self, interval: Option<(i32, Duration)>) -> Self
pub fn reenqueue_orphaned(self, interval: Option<(i32, Duration)>) -> Self
The rate at which orphaned jobs are returned to the queue
If None then no garbage collection of orphaned jobs
sourcepub fn fetch_interval(self, interval: Duration) -> Self
pub fn fetch_interval(self, interval: Duration) -> Self
The rate at which polling is occurring This may be ignored if the storage uses pubsub
Trait Implementations§
source§impl Debug for WorkerConfig
impl Debug for WorkerConfig
Auto Trait Implementations§
impl RefUnwindSafe for WorkerConfig
impl Send for WorkerConfig
impl Sync for WorkerConfig
impl Unpin for WorkerConfig
impl UnwindSafe for WorkerConfig
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