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, []