Skip to content

Commit

Permalink
Switchs drain all call to new thread
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanluciano committed Jan 15, 2025
1 parent 1c801c7 commit 64414a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prefect/logging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64414a3

Please sign in to comment.