YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
remove hack on resource monitor
Louis Beaumontd09b05ae6d15
diff --git a/screenpipe-server/src/resource_monitor.rs b/screenpipe-server/src/resource_monitor.rsindex 766a1eac0..f4e2d5142 100644--- a/screenpipe-server/src/resource_monitor.rs+++ b/screenpipe-server/src/resource_monitor.rs@@ -199,36 +199,11 @@ impl ResourceMonitor {}}- async fn send_audio_restart_signal() {- let client = Client::new();- match client- .post("http://localhost:3030/audio/restart")- .send()- .await- {- Ok(_) => info!("sent audio restart signal"),- Err(e) => error!("failed to send audio restart signal: {}", e),- }- }- async fn send_vision_restart_signal() {- let client = Client::new();- match client- .post("http://localhost:3030/vision/restart")- .send()- .await- {- Ok(_) => info!("sent vision restart signal"),- Err(e) => error!("failed to send vision restart signal: {}", e),- }- }-pub fn start_monitoring(self: &Arc<Self>, interval: Duration) {let monitor = Arc::clone(self);tokio::spawn(async move {- let mut sys = System::new_all();- let mut last_audio_restart = Instant::now();- let audio_restart_interval = Duration::from_secs(60 * 60 * 2); // TODO: change to 2 hours for release+ let mut sys = System::new_all();loop {tokio::select! {@@ -236,14 +211,6 @@ impl ResourceMonitor {sys.refresh_all();monitor.log_status(&sys).await;- // Check if it's time to send audio restart signal- if last_audio_restart.elapsed() >= audio_restart_interval {- tokio::join!(- Self::send_audio_restart_signal(),- Self::send_vision_restart_signal()- );- last_audio_restart = Instant::now();- }}}}