worker task: remove debug print, faster modulo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-29 12:35:33 +01:00
parent 14e0862509
commit 7f3d91003c

View File

@ -374,7 +374,7 @@ fn update_active_workers(new_upid: Option<&UPID>) -> Result<(), Error> {
} }
if !worker_is_active_local(&info.upid) { if !worker_is_active_local(&info.upid) {
println!("Detected stopped UPID {}", &info.upid_str); println!("Detected stopped task '{}'", &info.upid_str);
let now = proxmox::tools::time::epoch_i64(); let now = proxmox::tools::time::epoch_i64();
let status = upid_read_status(&info.upid) let status = upid_read_status(&info.upid)
.unwrap_or_else(|_| TaskState::Unknown { endtime: now }); .unwrap_or_else(|_| TaskState::Unknown { endtime: now });
@ -652,7 +652,7 @@ impl WorkerTask {
let mut path = std::path::PathBuf::from(PROXMOX_BACKUP_TASK_DIR); let mut path = std::path::PathBuf::from(PROXMOX_BACKUP_TASK_DIR);
path.push(format!("{:02X}", upid.pstart % 256)); path.push(format!("{:02X}", upid.pstart & 255));
let backup_user = crate::backup::backup_user()?; let backup_user = crate::backup::backup_user()?;
@ -660,8 +660,6 @@ impl WorkerTask {
path.push(upid.to_string()); path.push(upid.to_string());
println!("FILE: {:?}", path);
let logger_options = FileLogOptions { let logger_options = FileLogOptions {
to_stdout: to_stdout, to_stdout: to_stdout,
exclusive: true, exclusive: true,