mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-16 08:49:28 +00:00
minimize change
This commit is contained in:
parent
ed78090b8e
commit
06d02bf3de
23 changed files with 161 additions and 197 deletions
|
|
@ -96,21 +96,19 @@ class ResponsesStore:
|
|||
logger.info("Write queue disabled for SQLite to avoid concurrency issues")
|
||||
|
||||
async def shutdown(self) -> None:
|
||||
if self._worker_tasks:
|
||||
if self._queue is not None:
|
||||
await self._queue.join()
|
||||
for t in self._worker_tasks:
|
||||
if not t.done():
|
||||
t.cancel()
|
||||
for t in self._worker_tasks:
|
||||
try:
|
||||
await t
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
self._worker_tasks.clear()
|
||||
|
||||
if self.sql_store:
|
||||
await self.sql_store.close()
|
||||
if not self._worker_tasks:
|
||||
return
|
||||
if self._queue is not None:
|
||||
await self._queue.join()
|
||||
for t in self._worker_tasks:
|
||||
if not t.done():
|
||||
t.cancel()
|
||||
for t in self._worker_tasks:
|
||||
try:
|
||||
await t
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
self._worker_tasks.clear()
|
||||
|
||||
async def flush(self) -> None:
|
||||
"""Wait for all queued writes to complete. Useful for testing."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue