pub struct DatabaseQueue {
pub connection: Option<String>,
pub table: String,
pub queue: String,
}Expand description
A connection that keeps jobs in a database table, with the database driver.
use laravel::config::queue::DatabaseQueue;
let queue = DatabaseQueue::new()
.connection("reporting")
.table("report_jobs")
.queue("reports");Fields§
§connection: Option<String>The name of the database connection, or None for the default connection.
table: StringThe table, optionally qualified by its schema, such as queue.jobs.
queue: StringThe queue that jobs join when they don’t name one.
Implementations§
Source§impl DatabaseQueue
impl DatabaseQueue
Sourcepub fn new() -> DatabaseQueue
pub fn new() -> DatabaseQueue
Returns a connection that uses the default database connection, the jobs table, and the
default queue.
Sourcepub fn from_env(env: &Env) -> DatabaseQueue
pub fn from_env(env: &Env) -> DatabaseQueue
Returns a connection that reads DB_QUEUE_CONNECTION, DB_QUEUE_TABLE, and DB_QUEUE. A
variable that isn’t set keeps the default from DatabaseQueue::new.
Sourcepub fn connection(self, name: impl Into<String>) -> DatabaseQueue
pub fn connection(self, name: impl Into<String>) -> DatabaseQueue
Sets the named database connection to use instead of the default connection.
Sourcepub fn table(self, table: impl Into<String>) -> DatabaseQueue
pub fn table(self, table: impl Into<String>) -> DatabaseQueue
Sets the table, optionally qualified by its schema.
Sourcepub fn queue(self, queue: impl Into<String>) -> DatabaseQueue
pub fn queue(self, queue: impl Into<String>) -> DatabaseQueue
Sets the queue that jobs join when they don’t name one.
Trait Implementations§
Source§impl Clone for DatabaseQueue
impl Clone for DatabaseQueue
Source§fn clone(&self) -> DatabaseQueue
fn clone(&self) -> DatabaseQueue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseQueue
impl Debug for DatabaseQueue
Source§impl Default for DatabaseQueue
impl Default for DatabaseQueue
Source§fn default() -> DatabaseQueue
fn default() -> DatabaseQueue
Returns the “default value” for a type. Read more
impl Eq for DatabaseQueue
Source§impl From<DatabaseQueue> for ConnectionConfig
impl From<DatabaseQueue> for ConnectionConfig
Source§fn from(queue: DatabaseQueue) -> ConnectionConfig
fn from(queue: DatabaseQueue) -> ConnectionConfig
Converts to this type from the input type.
Source§impl PartialEq for DatabaseQueue
impl PartialEq for DatabaseQueue
impl StructuralPartialEq for DatabaseQueue
Auto Trait Implementations§
impl Forget for DatabaseQueue
impl Freeze for DatabaseQueue
impl Move for DatabaseQueue
impl RefUnwindSafe for DatabaseQueue
impl Send for DatabaseQueuewhere
RawVecInner: Send,
impl Sync for DatabaseQueuewhere
RawVecInner: Sync,
impl Unpin for DatabaseQueue
impl UnsafeUnpin for DatabaseQueue
impl UnwindSafe for DatabaseQueuewhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreCreates a shared type from an unshared type.