(&self, sandbox_id: &str)
| 1388 | } |
| 1389 | |
| 1390 | async fn cleanup_sandbox_ssh_sessions(&self, sandbox_id: &str) { |
| 1391 | if let Ok(records) = self.store.list(SshSession::object_type(), 1000, 0).await { |
| 1392 | for record in records { |
| 1393 | if let Ok(session) = SshSession::decode(record.payload.as_slice()) |
| 1394 | && session.sandbox_id == sandbox_id |
| 1395 | && let Err(e) = self |
| 1396 | .store |
| 1397 | .delete(SshSession::object_type(), session.object_id()) |
| 1398 | .await |
| 1399 | { |
| 1400 | warn!( |
| 1401 | sandbox_id = %sandbox_id, |
| 1402 | session_id = %session.object_id(), |
| 1403 | error = %e, |
| 1404 | "Failed to delete SSH session during sandbox cleanup" |
| 1405 | ); |
| 1406 | } |
| 1407 | } |
| 1408 | } |
| 1409 | } |
| 1410 | |
| 1411 | fn cleanup_sandbox_state(&self, sandbox_id: &str) { |
| 1412 | self.tracing_log_bus.remove(sandbox_id); |
no test coverage detected