pub struct MysqlStorage<T> { /* private fields */ }
Available on crate feature mysql only.
Expand description

Represents a Storage that persists to MySQL

Implementations§

Create a new instance from a pool

Create a Mysql Connection and start a Storage

Setup

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the counts of jobs in different states
Fetch jobs persisted from storage
List all Workers that are working on a Job Stream

Puts the job instantly back into the queue Another [Worker] may consume

The type of job that can be persisted
Pushes a job to a storage Read more
Push a job into the scheduled set
Fetch a job given an id
Used for scheduling jobs
Kill a job that returns [JobResult::Kill]
Get the stream of jobs
Return the number of pending jobs from the queue
Acknowledge a job which returns [JobResult::Success]
Kill a job that returns [JobResult::Reschedule] [JobResult::Reschedule]: crate::response::JobResult
Update a job details
Called by a Worker to keep the storage alive and prevent jobs from being deemed as orphaned
Used to recover jobs when a Worker shuts down.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Consume the stream of jobs from Storage

The job result
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.