fix duplicate declaration of _shutdown_event (#410)

fix duplicate declaration of _shutdown_event
reported by issue
https://github.com/openai/openai-agents-python/issues/314
This commit is contained in:
Ddper 2025-04-01 23:48:02 +08:00 committed by GitHub
parent 9c53abe8c1
commit 8b2bc0b4ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -182,7 +182,6 @@ class BatchTraceProcessor(TracingProcessor):
# Track when we next *must* perform a scheduled export
self._next_export_time = time.time() + self._schedule_delay
self._shutdown_event = threading.Event()
self._worker_thread = threading.Thread(target=self._run, daemon=True)
self._worker_thread.start()