fix use of deprecated items

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2020-01-16 08:58:54 +01:00
parent 18c0df4c92
commit 619495b25e
2 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,8 @@ use chrono::Local;
use std::sync::atomic::{AtomicUsize, Ordering};
use proxmox::sys::linux::procfs;
/// Unique Process/Task Identifier
///
/// We use this to uniquely identify worker task. UPIDs have a short
@ -60,7 +62,7 @@ impl UPID {
Ok(UPID {
pid,
pstart: proxmox::sys::linux::procfs::read_proc_starttime(pid)?,
pstart: procfs::PidStat::read_for_pid(nix::unistd::Pid::from_raw(pid))?.starttime,
starttime: Local::now().timestamp(),
task_id,
worker_type: worker_type.to_owned(),