From d254f508f48935652f054777652938ad71976cce Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 22 Aug 2025 18:10:48 -0700 Subject: [PATCH] fix GLOBAL_LOGGING_WORKER --- tests/test_litellm/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_litellm/conftest.py b/tests/test_litellm/conftest.py index ac8a00d850c..988406f1f37 100644 --- a/tests/test_litellm/conftest.py +++ b/tests/test_litellm/conftest.py @@ -51,6 +51,13 @@ def setup_and_teardown(): litellm.in_memory_llm_clients_cache.flush_cache() + # empty the global logging worker queue + import asyncio + + from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER + if GLOBAL_LOGGING_WORKER._queue is not None: + GLOBAL_LOGGING_WORKER._queue = asyncio.Queue() + import asyncio loop = asyncio.get_event_loop_policy().new_event_loop()