MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / _teardown_db_manager

Function _teardown_db_manager

src/codegraphcontext/server.py:53–58  ·  view source on GitHub ↗

Release DB resources; stop FalkorDB Lite worker when switching contexts.

(db_manager)

Source from the content-addressed store, hash-verified

51
52
53def _teardown_db_manager(db_manager) -> None:
54 """Release DB resources; stop FalkorDB Lite worker when switching contexts."""
55 if getattr(db_manager, "get_backend_type", lambda: "")() == "falkordb":
56 db_manager.close_driver(teardown=True)
57 else:
58 db_manager.close_driver()
59
60
61def _is_path_key(key: str) -> bool:

Callers 2

switch_context_toolMethod · 0.85
shutdownMethod · 0.85

Calls 1

close_driverMethod · 0.45

Tested by

no test coverage detected