From b03c83e3d553ab02ff48ee51d3dd46ef2f109585 Mon Sep 17 00:00:00 2001 From: reibs Date: Mon, 28 Oct 2024 21:08:01 -0700 Subject: [PATCH] revert session changes --- agentops/session.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agentops/session.py b/agentops/session.py index 6b639433..72c5bdff 100644 --- a/agentops/session.py +++ b/agentops/session.py @@ -61,13 +61,16 @@ def __init__( "errors": 0, "apis": 0, } - self.is_running = False - active_sessions.append(self) self.stop_flag = threading.Event() self.thread = threading.Thread(target=self._run, args=(callback,)) self.thread.daemon = True self.thread.start() + self.is_running = self._start_session() + if self.is_running == False: + self.stop_flag.set() + self.thread.join(timeout=1) + def set_video(self, video: str) -> None: """ Sets a url to the video recording of the session.