pub struct TaskQueueBuilder { /* private fields */ }
Expand description
Builder for configuring and creating TaskQueue instances
Implementations§
Source§impl TaskQueueBuilder
impl TaskQueueBuilder
Sourcepub fn new(redis_url: impl Into<String>) -> Self
pub fn new(redis_url: impl Into<String>) -> Self
Create a new TaskQueue builder with default configuration
Sourcepub fn from_global_config() -> Result<Self, TaskQueueError>
pub fn from_global_config() -> Result<Self, TaskQueueError>
Create a TaskQueue builder from global configuration
Sourcepub fn from_config(config: TaskQueueConfig) -> Self
pub fn from_config(config: TaskQueueConfig) -> Self
Create a TaskQueue builder from a specific configuration
Sourcepub fn auto() -> Result<Self, TaskQueueError>
pub fn auto() -> Result<Self, TaskQueueError>
Create a TaskQueue builder that auto-loads configuration
Sourcepub fn redis_url(self, url: impl Into<String>) -> Self
pub fn redis_url(self, url: impl Into<String>) -> Self
Override Redis URL (useful for testing or special cases)
Sourcepub fn autoscaler_config(self, config: AutoScalerConfig) -> Self
pub fn autoscaler_config(self, config: AutoScalerConfig) -> Self
Set the auto-scaler configuration
Sourcepub fn initial_workers(self, count: usize) -> Self
pub fn initial_workers(self, count: usize) -> Self
Set the initial number of workers to start
Sourcepub fn task_registry(self, registry: Arc<TaskRegistry>) -> Self
pub fn task_registry(self, registry: Arc<TaskRegistry>) -> Self
Set a custom task registry
Sourcepub fn auto_register_tasks(self) -> Self
pub fn auto_register_tasks(self) -> Self
Enable automatic task registration using inventory pattern
Sourcepub fn disable_auto_register(self) -> Self
pub fn disable_auto_register(self) -> Self
Disable automatic task registration
Sourcepub fn with_scheduler(self) -> Self
pub fn with_scheduler(self) -> Self
Start the task scheduler automatically
Sourcepub fn with_autoscaler(self) -> Self
pub fn with_autoscaler(self) -> Self
Start the auto-scaler automatically
Sourcepub fn config(self, config: TaskQueueConfig) -> Self
pub fn config(self, config: TaskQueueConfig) -> Self
Update the full configuration
Auto Trait Implementations§
impl Freeze for TaskQueueBuilder
impl !RefUnwindSafe for TaskQueueBuilder
impl Send for TaskQueueBuilder
impl Sync for TaskQueueBuilder
impl Unpin for TaskQueueBuilder
impl !UnwindSafe for TaskQueueBuilder
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