close connections

This commit is contained in:
Raghotham Murthy 2025-10-07 08:29:06 -07:00
parent 22077e7f32
commit fa100c77fd
7 changed files with 13 additions and 5 deletions

View file

@ -314,7 +314,7 @@ class MetaReferenceAgentsImpl(Agents):
return paginate_records(session_dicts, start_index, limit)
async def shutdown(self) -> None:
pass
await self.persistence_store.close()
# OpenAI responses
async def get_openai_response(

View file

@ -129,6 +129,7 @@ class ReferenceBatchesImpl(Batches):
# don't cancel tasks - just let them stop naturally on shutdown
# cancelling would mark batches as "cancelled" in the database
logger.info(f"Shutdown initiated with {len(self._processing_tasks)} active batch processing tasks")
await self.kvstore.close()
# TODO (SECURITY): this currently works w/ configured api keys, not with x-llamastack-provider-data or with user policy restrictions
async def create_batch(

View file

@ -64,7 +64,8 @@ class MetaReferenceEvalImpl(
benchmark = Benchmark.model_validate_json(benchmark)
self.benchmarks[benchmark.identifier] = benchmark
async def shutdown(self) -> None: ...
async def shutdown(self) -> None:
await self.kvstore.close()
async def register_benchmark(self, task_def: Benchmark) -> None:
# Store in kvstore