#[non_exhaustive]pub struct TaskConfig {Show 13 fields
pub max_retries: u32,
pub retry_for_errors: Vec<String>,
pub concurrency_control: ConcurrencyControlType,
pub running_concurrency: Option<u32>,
pub registration_concurrency: ConcurrencyControlType,
pub cache_results: bool,
pub key_arguments: Vec<String>,
pub disable_cache_args: Vec<String>,
pub on_diff_non_key_args_raise: bool,
pub parallel_batch_size: usize,
pub force_new_workflow: bool,
pub reroute_on_cc: bool,
pub blocking: bool,
}Expand description
Per-task configuration options.
Mirrors pynenc’s ConfigTask with settings for retries, concurrency,
and execution behavior.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_retries: u32Maximum number of retry attempts (0 = no retries)
retry_for_errors: Vec<String>Error type names that should trigger a retry.
Empty means only explicit RetryError triggers retries.
concurrency_control: ConcurrencyControlTypeConcurrency control strategy for running invocations
running_concurrency: Option<u32>Maximum number of concurrent invocations (when using Task concurrency)
registration_concurrency: ConcurrencyControlTypeConcurrency control strategy applied at registration time
cache_results: boolWhether to cache results for identical arguments
key_arguments: Vec<String>Parameter names used as concurrency keys (when using Task concurrency)
disable_cache_args: Vec<String>Argument names to exclude from cache key computation
on_diff_non_key_args_raise: boolRaise an error when a call with matching key args but different non-key args is registered (prevents silent overwrites)
parallel_batch_size: usizeBatch size for parallelize() — how many calls to submit at once
force_new_workflow: boolForce a new workflow even if a matching invocation already exists
reroute_on_cc: boolReroute an invocation when it hits concurrency control limits
blocking: boolWhether to run this task on a blocking thread (tokio::task::spawn_blocking).
Use for CPU-bound or synchronous I/O tasks that could starve the async executor.
Trait Implementations§
Source§impl Clone for TaskConfig
impl Clone for TaskConfig
Source§fn clone(&self) -> TaskConfig
fn clone(&self) -> TaskConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more