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

Method find_active

atomic-agent/src/turn/session.rs:580–583  ·  view source on GitHub ↗

Find all active (non-ended) sessions. Returns sessions where `phase != Ended`.

(&self)

Source from the content-addressed store, hash-verified

578 ///
579 /// Returns sessions where `phase != Ended`.
580 pub fn find_active(&self) -> AgentResult<Vec<AgentSession>> {
581 let all = self.list()?;
582 Ok(all.into_iter().filter(|s| !s.is_ended()).collect())
583 }
584
585 /// Find all ended sessions.
586 pub fn find_ended(&self) -> AgentResult<Vec<AgentSession>> {

Callers 3

resolve_active_sessionFunction · 0.80
test_store_find_activeFunction · 0.80

Calls 3

listMethod · 0.45
into_iterMethod · 0.45
is_endedMethod · 0.45

Tested by 2

test_store_find_activeFunction · 0.64