src/bin/proxmox-backup-proxy.rs: use block_in_place for rrd update
This commit is contained in:
parent
736edc7a7e
commit
4f9513996c
@ -605,6 +605,8 @@ async fn generate_host_stats() {
|
||||
read_meminfo, read_proc_stat, read_proc_net_dev};
|
||||
use proxmox_backup::rrd;
|
||||
|
||||
proxmox_backup::tools::runtime::block_in_place(move || {
|
||||
|
||||
match read_proc_stat() {
|
||||
Ok(stat) => {
|
||||
if let Err(err) = rrd::update_value("host/cpu", stat.cpu, rrd::DST::Gauge) {
|
||||
@ -650,5 +652,5 @@ async fn generate_host_stats() {
|
||||
eprintln!("read_prox_net_dev failed - {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user