pub struct StateConfig {
pub run_ttl: Duration,
pub task_ttl: Duration,
pub sweep_interval: Duration,
}Expand description
Configuration for in-memory state retention and periodic sweep.
| Parameter | Controls | Default |
|---|---|---|
run_ttl | How long finished runs are retained before sweep removes them | 1 hour |
task_ttl | How long terminal tasks (no active runs) are retained | 1 hour |
sweep_interval | How often the sweep runs | 5 minutes |
§Also
TaskState::sweepconsumes these TTL settings.SupervisorApi::newaccepts this config and auto-starts the sweep task.
Fields§
§run_ttl: DurationHow long to keep completed runs before sweep removes them.
task_ttl: DurationHow long to keep tasks in a terminal phase (with no active runs) before sweep removes them.
sweep_interval: DurationHow often the sweep embedded task runs.
Trait Implementations§
Source§impl Clone for StateConfig
impl Clone for StateConfig
Source§fn clone(&self) -> StateConfig
fn clone(&self) -> StateConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StateConfig
impl Debug for StateConfig
Auto Trait Implementations§
impl Freeze for StateConfig
impl RefUnwindSafe for StateConfig
impl Send for StateConfig
impl Sync for StateConfig
impl Unpin for StateConfig
impl UnsafeUnpin for StateConfig
impl UnwindSafe for StateConfig
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