Struct apalis_sql::Config
source · pub struct Config { /* private fields */ }Expand description
Config for sql storages
Implementations§
source§impl Config
impl Config
sourcepub fn set_poll_interval(self, interval: Duration) -> Self
pub fn set_poll_interval(self, interval: Duration) -> Self
Interval between database poll queries
Defaults to 100ms
sourcepub fn set_keep_alive(self, keep_alive: Duration) -> Self
pub fn set_keep_alive(self, keep_alive: Duration) -> Self
Interval between worker keep-alive database updates
Defaults to 30s
sourcepub fn set_buffer_size(self, buffer_size: usize) -> Self
pub fn set_buffer_size(self, buffer_size: usize) -> Self
Buffer size to use when querying for jobs
Defaults to 10
sourcepub fn set_namespace(self, namespace: &str) -> Self
pub fn set_namespace(self, namespace: &str) -> Self
Set the namespace to consume and push jobs to
Defaults to “apalis::sql”
sourcepub fn keep_alive(&self) -> &Duration
pub fn keep_alive(&self) -> &Duration
Gets a reference to the keep_alive duration.
sourcepub fn keep_alive_mut(&mut self) -> &mut Duration
pub fn keep_alive_mut(&mut self) -> &mut Duration
Gets a mutable reference to the keep_alive duration.
sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Gets the buffer size.
sourcepub fn poll_interval(&self) -> &Duration
pub fn poll_interval(&self) -> &Duration
Gets a reference to the poll_interval duration.
sourcepub fn poll_interval_mut(&mut self) -> &mut Duration
pub fn poll_interval_mut(&mut self) -> &mut Duration
Gets a mutable reference to the poll_interval duration.
sourcepub fn namespace_mut(&mut self) -> &mut String
pub fn namespace_mut(&mut self) -> &mut String
Gets a mutable reference to the namespace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more