move worker_task.rs into proxmox-rest-server crate

Also moved pbs-datastore/src/task.rs to pbs-tools, which now depends on 'log'.
This commit is contained in:
Dietmar Maurer
2021-09-23 10:09:19 +02:00
parent 81867f0539
commit b9700a9fe5
46 changed files with 176 additions and 183 deletions

View File

@ -9,10 +9,9 @@ use proxmox::tools::fs::{CreateOptions, create_path, create_dir};
use pbs_api_types::GarbageCollectionStatus;
use pbs_tools::process_locker::{self, ProcessLocker};
use pbs_tools::{task_log, task::TaskState};
use crate::DataBlob;
use crate::task_log;
use crate::task::TaskState;
/// File system based chunk store
pub struct ChunkStore {
@ -306,7 +305,7 @@ impl ChunkStore {
for (entry, percentage, bad) in self.get_chunk_iterator()? {
if last_percentage != percentage {
last_percentage = percentage;
crate::task_log!(
task_log!(
worker,
"processed {}% ({} chunks)",
percentage,