From 89fb7ef4d7214ca93847237fe66c34d5da2b2a17 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Tue, 30 Jul 2024 17:10:27 -0700 Subject: [PATCH] clean up --- src/phoenix/db/bulk_inserter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/phoenix/db/bulk_inserter.py b/src/phoenix/db/bulk_inserter.py index a1abc3da8f..1a0f2f39ab 100644 --- a/src/phoenix/db/bulk_inserter.py +++ b/src/phoenix/db/bulk_inserter.py @@ -154,7 +154,12 @@ async def _bulk_insert(self) -> None: or self._spans or self._evaluations ): - if self._operations.empty() and not (self._spans or self._evaluations): + if ( + self._queue_inserters.empty + and self._operations.empty() + and not self._spans + and not self._evaluations + ): await asyncio.sleep(self._sleep) continue ops_remaining, events = self._max_ops_per_transaction, []