diff --git a/src/processor.rs b/src/processor.rs index 53ad707..d0770b5 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -29,7 +29,7 @@ pub struct Processor { config: ProcessorConfig, } -#[derive(Default, Clone)] +#[derive(Clone)] #[non_exhaustive] pub struct ProcessorConfig { /// The number of Sidekiq workers that can run at the same time. Adjust as needed based on @@ -102,6 +102,16 @@ impl ProcessorConfig { } } +impl Default for ProcessorConfig { + fn default() -> Self { + Self { + num_workers: num_cpus::get(), + balance_strategy: Default::default(), + queue_configs: Default::default(), + } + } +} + impl QueueConfig { #[must_use] pub fn num_workers(mut self, num_workers: usize) -> Self {