MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_by_state

Function list_by_state

atomic-cli/src/commands/agent/lifecycle.rs:829–833  ·  view source on GitHub ↗
(dir: &Path, now: i64)

Source from the content-addressed store, hash-verified

827}
828
829fn list_by_state(dir: &Path, now: i64) -> (Vec<ManagedLifecycle>, Vec<ManagedLifecycle>) {
830 list_lifecycles(dir)
831 .into_iter()
832 .partition(|lifecycle| !lifecycle.is_expired(now) && lifecycle.stop_state.is_none())
833}
834
835fn list_active(dir: &Path, now: i64) -> Vec<ManagedLifecycle> {
836 list_by_state(dir, now).0

Calls 4

list_lifecyclesFunction · 0.85
is_noneMethod · 0.80
into_iterMethod · 0.45
is_expiredMethod · 0.45