From 260147bd735adfd043861dfd68eb9be4062ac04b Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 14 Feb 2022 14:12:39 +0100 Subject: [PATCH] ParallelHandler: avoid re-export (cleanup) Signed-off-by: Dietmar Maurer --- src/api2/tape/restore.rs | 2 +- src/backup/verify.rs | 2 +- src/server/pull.rs | 2 +- src/tools/mod.rs | 1 - src/tools/parallel_handler.rs | 2 ++ 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api2/tape/restore.rs b/src/api2/tape/restore.rs index aac1826b..2ce16c9d 100644 --- a/src/api2/tape/restore.rs +++ b/src/api2/tape/restore.rs @@ -36,7 +36,7 @@ use pbs_tape::{ use proxmox_rest_server::WorkerTask; use crate::{ - tools::ParallelHandler, + tools::parallel_handler::ParallelHandler, server::lookup_user_email, tape::{ TAPE_STATUS_DIR, diff --git a/src/backup/verify.rs b/src/backup/verify.rs index e835d625..307d366c 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -15,7 +15,7 @@ use pbs_datastore::index::IndexFile; use pbs_datastore::manifest::{archive_type, ArchiveType, BackupManifest, FileInfo}; use proxmox_sys::fs::lock_dir_noblock_shared; -use crate::tools::ParallelHandler; +use crate::tools::parallel_handler::ParallelHandler; /// A VerifyWorker encapsulates a task worker, datastore and information about which chunks have /// already been verified or detected as corrupt. diff --git a/src/server/pull.rs b/src/server/pull.rs index 8b52e8c2..a2a5f1f1 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -31,7 +31,7 @@ use pbs_tools::sha::sha256; use pbs_client::{BackupReader, BackupRepository, HttpClient, HttpClientOptions, RemoteChunkReader}; use proxmox_rest_server::WorkerTask; -use crate::tools::ParallelHandler; +use crate::tools::parallel_handler::ParallelHandler; // fixme: implement filters // fixme: delete vanished groups diff --git a/src/tools/mod.rs b/src/tools/mod.rs index 1f123848..685eb4a2 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -22,7 +22,6 @@ pub mod systemd; pub mod ticket; pub mod parallel_handler; -pub use parallel_handler::ParallelHandler; /// Shortcut for md5 sums. pub fn md5sum(data: &[u8]) -> Result { diff --git a/src/tools/parallel_handler.rs b/src/tools/parallel_handler.rs index 76f761c4..b2059406 100644 --- a/src/tools/parallel_handler.rs +++ b/src/tools/parallel_handler.rs @@ -1,3 +1,5 @@ +//! A thread pool which run a closure in parallel. + use std::sync::{Arc, Mutex}; use std::thread::JoinHandle;