diff --git a/src/prefect/logging/handlers.py b/src/prefect/logging/handlers.py index 0e254a9e58a9..1aa071d254f8 100644 --- a/src/prefect/logging/handlers.py +++ b/src/prefect/logging/handlers.py @@ -108,7 +108,7 @@ def flush(cls): # Not ideal, but this method is called by the stdlib and cannot return a # coroutine so we just schedule the drain in the global loop thread and continue - from_sync.call_soon_in_loop_thread(create_call(APILogWorker.drain_all)) + from_sync.call_soon_in_new_thread(create_call(APILogWorker.drain_all)) return None else: # We set a timeout of 5s because we don't want to block forever if the worker