feat: add toggle for CPU monitoring in backpressure handler
Co-authored-by: aider (openrouter/openai/o3-mini-high) <aider@aider.chat>
This commit is contained in:
@@ -162,6 +162,13 @@ class BackpressureHandler:
|
||||
self.last_data_message_time = time.time()
|
||||
|
||||
def start_backpressure_monitor(self) -> Thread:
|
||||
# Check if CPU monitoring is enabled in configuration
|
||||
cpu_monitoring_enabled = self.config.backpressure.cpu_monitoring_enabled
|
||||
|
||||
if not cpu_monitoring_enabled:
|
||||
logging_info("Backpressure CPU monitoring is disabled by configuration")
|
||||
return None
|
||||
|
||||
# Start the Backpressure monitor loop
|
||||
self.thread = Thread(target=self.backpressure_monitor_loop)
|
||||
self.thread.daemon = True # This makes it a daemon thread
|
||||
|
||||
Reference in New Issue
Block a user