Struct sqlxmq::JobRunnerOptions [−][src]
pub struct JobRunnerOptions { /* fields omitted */ }
Expand description
Type used to build a job runner.
Implementations
Begin constructing a new job runner using the specified connection pool, and the provided execution function.
pub fn set_concurrency(
&mut self,
min_concurrency: usize,
max_concurrency: usize
) -> &mut Self
pub fn set_concurrency(
&mut self,
min_concurrency: usize,
max_concurrency: usize
) -> &mut Self
Set the concurrency limits for this job runner. When the number of active jobs falls below the minimum, the runner will poll for more, up to the maximum.
The difference between the min and max will dictate the maximum batch size which can be received: larger batch sizes are more efficient.
Set the channel names which this job runner will subscribe to. If unspecified, the job runner will subscribe to all channels.
Choose whether to automatically keep jobs alive whilst they’re still
running. Defaults to true
.
Start the job runner in the background. The job runner will stop when the returned handle is dropped.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for JobRunnerOptions
impl Send for JobRunnerOptions
impl Sync for JobRunnerOptions
impl Unpin for JobRunnerOptions
impl !UnwindSafe for JobRunnerOptions
Blanket Implementations
Mutably borrows from an owned value. Read more