MCPcopy
hub / github.com/gpustack/gpustack / async_session

Function async_session

gpustack/server/db.py:17–27  ·  view source on GitHub ↗

Get an AsyncSession with default expire_on_commit=False. Returns: AsyncSession: Configured session with expire_on_commit=False

()

Source from the content-addressed store, hash-verified

15
16
17def async_session() -> AsyncSession:
18 """
19 Get an AsyncSession with default expire_on_commit=False.
20
21 Returns:
22 AsyncSession: Configured session with expire_on_commit=False
23 """
24 if engine is None:
25 raise RuntimeError("Database not initialized. Call init_database() first.")
26
27 return AsyncSession(engine, expire_on_commit=False)

Callers 15

_do_cached_all_queryMethod · 0.90
_evaluateMethod · 0.90
_schedule_oneMethod · 0.90
get_clustersFunction · 0.90
cluster_apiserver_proxyFunction · 0.90
get_gpusFunction · 0.90
listFunction · 0.90
_fetch_granted_route_idsFunction · 0.90
_get_model_routesFunction · 0.90
get_modelsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected