From 9c37f9a162d909c6e1c5dbaefc7fe69f9ad0ef7b Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 27 Aug 2024 14:11:51 +0000 Subject: [PATCH] Fix compatibility issue with sysinfo 0.31.0 --- virtweb_backend/src/controllers/server_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtweb_backend/src/controllers/server_controller.rs b/virtweb_backend/src/controllers/server_controller.rs index 0f83021..f42ffe5 100644 --- a/virtweb_backend/src/controllers/server_controller.rs +++ b/virtweb_backend/src/controllers/server_controller.rs @@ -171,7 +171,7 @@ pub async fn network_hook_status() -> HttpResult { pub async fn number_vcpus() -> HttpResult { let mut system = System::new(); - system.refresh_cpu(); + system.refresh_cpu_all(); let number_cpus = system.cpus().len(); assert_ne!(number_cpus, 0, "Got invlid number of CPU!");