Struct Config

Source
pub struct Config { /* private fields */ }
Expand description

Config for a RedisStorage

Implementations§

Source§

impl Config

Source

pub fn get_poll_interval(&self) -> &Duration

Get the interval of polling

Source

pub fn get_buffer_size(&self) -> usize

Get the number of jobs to fetch

Source

pub fn get_keep_alive(&self) -> &Duration

get the keep live rate

Source

pub fn get_enqueue_scheduled(&self) -> &Duration

get the enqueued setting

Source

pub fn get_namespace(&self) -> &String

get the namespace

Source

pub fn set_poll_interval(self, poll_interval: Duration) -> Self

get the poll interval

Source

pub fn set_buffer_size(self, buffer_size: usize) -> Self

set the buffer setting

Source

pub fn set_keep_alive(self, keep_alive: Duration) -> Self

set the keep-alive setting

Source

pub fn set_enqueue_scheduled(self, enqueue_scheduled: Duration) -> Self

get the enqueued setting

Source

pub fn set_namespace(self, namespace: &str) -> Self

set the namespace for the Storage

Source

pub fn active_jobs_list(&self) -> String

Returns the Redis key for the list of pending jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the pending jobs list.

Source

pub fn consumers_set(&self) -> String

Returns the Redis key for the set of consumers associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the consumers set.

Source

pub fn dead_jobs_set(&self) -> String

Returns the Redis key for the set of dead jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the dead jobs set.

Source

pub fn done_jobs_set(&self) -> String

Returns the Redis key for the set of done jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the done jobs set.

Source

pub fn failed_jobs_set(&self) -> String

Returns the Redis key for the set of failed jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the failed jobs set.

Source

pub fn inflight_jobs_set(&self) -> String

Returns the Redis key for the set of inflight jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the inflight jobs set.

Source

pub fn job_data_hash(&self) -> String

Returns the Redis key for the hash storing job data associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the job data hash.

Source

pub fn scheduled_jobs_set(&self) -> String

Returns the Redis key for the set of scheduled jobs associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the scheduled jobs set.

Source

pub fn signal_list(&self) -> String

Returns the Redis key for the list of signals associated with the queue. The key is dynamically generated using the namespace of the queue.

§Returns

A String representing the Redis key for the signal list.

Source

pub fn reenqueue_orphaned_after(&self) -> Duration

Gets the reenqueue_orphaned_after duration.

Source

pub fn reenqueue_orphaned_after_mut(&mut self) -> &mut Duration

Gets a mutable reference to the reenqueue_orphaned_after.

Source

pub fn set_reenqueue_orphaned_after(self, after: Duration) -> Self

Occasionally some workers die, or abandon jobs because of panics. This is the time a task takes before its back to the queue

Defaults to 5 minutes

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,