Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

fix: set rpm controller timer as daemon to prevent process hang

Alex Larionov807f97114f14
diff --git a/lib/crewai/src/crewai/utilities/rpm_controller.py b/lib/crewai/src/crewai/utilities/rpm_controller.py
index 4704c3e5b..d745bfc5e 100644
--- a/lib/crewai/src/crewai/utilities/rpm_controller.py
+++ b/lib/crewai/src/crewai/utilities/rpm_controller.py
@@ -79,6 +79,7 @@ class RPMController(BaseModel):
self._current_rpm = 0
if not self._shutdown_flag:
self._timer = threading.Timer(60.0, self._reset_request_count)
+ self._timer.daemon = True
self._timer.start()
if self._lock: