MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get_sessions

Method get_sessions

irc_dpi.py:388–392  ·  view source on GitHub ↗
(self, limit: int = 50)

Source from the content-addressed store, hash-verified

386 # ------------------------------------------------------------------ #
387
388 def get_sessions(self, limit: int = 50) -> List[Dict[str, Any]]:
389 with self._lock:
390 sessions = list(self._sessions.values())
391 sessions.sort(key=lambda s: s.last_seen, reverse=True)
392 return [s.to_dict() for s in sessions[:limit]]
393
394 def get_session(self, client_ip: str, server_ip: str,
395 server_port: int) -> Optional[Dict[str, Any]]:

Callers 4

get_irc_sessionsMethod · 0.80
test_clear_resets_stateFunction · 0.80

Calls 3

sortMethod · 0.80
valuesMethod · 0.45
to_dictMethod · 0.45

Tested by 3

test_clear_resets_stateFunction · 0.64