mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 06:14:37 +00:00
Flush (#30157)
This commit is contained in:
parent
a7ab5e8372
commit
bac3a28e70
@ -50,8 +50,8 @@ def log_error_once(method: str, exception: Exception) -> None:
|
|||||||
|
|
||||||
def wait_for_all_tracers() -> None:
|
def wait_for_all_tracers() -> None:
|
||||||
"""Wait for all tracers to finish."""
|
"""Wait for all tracers to finish."""
|
||||||
if rt._CLIENT is not None and rt._CLIENT.tracing_queue is not None:
|
if rt._CLIENT is not None:
|
||||||
rt._CLIENT.tracing_queue.join()
|
rt._CLIENT.flush()
|
||||||
|
|
||||||
|
|
||||||
def get_client() -> Client:
|
def get_client() -> Client:
|
||||||
@ -319,5 +319,5 @@ class LangChainTracer(BaseTracer):
|
|||||||
|
|
||||||
def wait_for_futures(self) -> None:
|
def wait_for_futures(self) -> None:
|
||||||
"""Wait for the given futures to complete."""
|
"""Wait for the given futures to complete."""
|
||||||
if self.client is not None and self.client.tracing_queue is not None:
|
if self.client is not None:
|
||||||
self.client.tracing_queue.join()
|
self.client.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user