pub struct DefaultRunnerConfigBuilder { /* private fields */ }Expand description
Builder for DefaultRunnerConfig.
Use this builder to create a customized configuration:
let config = DefaultRunnerConfig::builder()
.max_concurrent_tasks(8)
.enable_cron_scheduling(false)
.build();Implementations§
Source§impl DefaultRunnerConfigBuilder
impl DefaultRunnerConfigBuilder
Sourcepub fn max_concurrent_tasks(self, value: usize) -> Self
pub fn max_concurrent_tasks(self, value: usize) -> Self
Sets the maximum number of concurrent task executions.
Sourcepub fn scheduler_poll_interval(self, value: Duration) -> Self
pub fn scheduler_poll_interval(self, value: Duration) -> Self
Sets the scheduler poll interval.
Sourcepub fn task_timeout(self, value: Duration) -> Self
pub fn task_timeout(self, value: Duration) -> Self
Sets the task timeout.
Sourcepub fn workflow_timeout(self, value: Option<Duration>) -> Self
pub fn workflow_timeout(self, value: Option<Duration>) -> Self
Sets the workflow timeout.
Sourcepub fn db_pool_size(self, value: u32) -> Self
pub fn db_pool_size(self, value: u32) -> Self
Sets the database pool size.
Sourcepub fn enable_recovery(self, value: bool) -> Self
pub fn enable_recovery(self, value: bool) -> Self
Enables or disables automatic recovery.
Sourcepub fn enable_cron_scheduling(self, value: bool) -> Self
pub fn enable_cron_scheduling(self, value: bool) -> Self
Enables or disables cron scheduling.
Sourcepub fn cron_poll_interval(self, value: Duration) -> Self
pub fn cron_poll_interval(self, value: Duration) -> Self
Sets the cron poll interval.
Sourcepub fn cron_max_catchup_executions(self, value: usize) -> Self
pub fn cron_max_catchup_executions(self, value: usize) -> Self
Sets the maximum catchup executions for cron.
Sourcepub fn cron_enable_recovery(self, value: bool) -> Self
pub fn cron_enable_recovery(self, value: bool) -> Self
Enables or disables cron recovery.
Sourcepub fn cron_recovery_interval(self, value: Duration) -> Self
pub fn cron_recovery_interval(self, value: Duration) -> Self
Sets the cron recovery interval.
Sourcepub fn cron_lost_threshold_minutes(self, value: i32) -> Self
pub fn cron_lost_threshold_minutes(self, value: i32) -> Self
Sets the cron lost threshold in minutes.
Sourcepub fn cron_max_recovery_age(self, value: Duration) -> Self
pub fn cron_max_recovery_age(self, value: Duration) -> Self
Sets the maximum cron recovery age.
Sourcepub fn cron_max_recovery_attempts(self, value: usize) -> Self
pub fn cron_max_recovery_attempts(self, value: usize) -> Self
Sets the maximum cron recovery attempts.
Sourcepub fn enable_trigger_scheduling(self, value: bool) -> Self
pub fn enable_trigger_scheduling(self, value: bool) -> Self
Enables or disables trigger scheduling.
Sourcepub fn trigger_base_poll_interval(self, value: Duration) -> Self
pub fn trigger_base_poll_interval(self, value: Duration) -> Self
Sets the trigger base poll interval.
Sourcepub fn trigger_poll_timeout(self, value: Duration) -> Self
pub fn trigger_poll_timeout(self, value: Duration) -> Self
Sets the trigger poll timeout.
Sourcepub fn enable_registry_reconciler(self, value: bool) -> Self
pub fn enable_registry_reconciler(self, value: bool) -> Self
Enables or disables the registry reconciler.
Sourcepub fn registry_reconcile_interval(self, value: Duration) -> Self
pub fn registry_reconcile_interval(self, value: Duration) -> Self
Sets the registry reconcile interval.
Sourcepub fn registry_enable_startup_reconciliation(self, value: bool) -> Self
pub fn registry_enable_startup_reconciliation(self, value: bool) -> Self
Enables or disables startup reconciliation.
Sourcepub fn registry_storage_path(self, value: Option<PathBuf>) -> Self
pub fn registry_storage_path(self, value: Option<PathBuf>) -> Self
Sets the registry storage path.
Sourcepub fn registry_storage_backend(self, value: impl Into<String>) -> Self
pub fn registry_storage_backend(self, value: impl Into<String>) -> Self
Sets the registry storage backend.
Sourcepub fn runner_name(self, value: Option<String>) -> Self
pub fn runner_name(self, value: Option<String>) -> Self
Sets the runner name.
Sourcepub fn routing_config(self, value: Option<RoutingConfig>) -> Self
pub fn routing_config(self, value: Option<RoutingConfig>) -> Self
Sets the routing configuration.
Sourcepub fn enable_claiming(self, value: bool) -> Self
pub fn enable_claiming(self, value: bool) -> Self
Enables or disables task claiming for horizontal scaling.
Sourcepub fn heartbeat_interval(self, value: Duration) -> Self
pub fn heartbeat_interval(self, value: Duration) -> Self
Sets the heartbeat interval for claimed tasks.
Sourcepub fn build(self) -> Result<DefaultRunnerConfig, ConfigError>
pub fn build(self) -> Result<DefaultRunnerConfig, ConfigError>
Builds and validates the configuration.
Returns an error if any configuration value is out of bounds.
Trait Implementations§
Source§impl Clone for DefaultRunnerConfigBuilder
impl Clone for DefaultRunnerConfigBuilder
Source§fn clone(&self) -> DefaultRunnerConfigBuilder
fn clone(&self) -> DefaultRunnerConfigBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DefaultRunnerConfigBuilder
impl Debug for DefaultRunnerConfigBuilder
Auto Trait Implementations§
impl Freeze for DefaultRunnerConfigBuilder
impl RefUnwindSafe for DefaultRunnerConfigBuilder
impl Send for DefaultRunnerConfigBuilder
impl Sync for DefaultRunnerConfigBuilder
impl Unpin for DefaultRunnerConfigBuilder
impl UnsafeUnpin for DefaultRunnerConfigBuilder
impl UnwindSafe for DefaultRunnerConfigBuilder
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more