src/api2/admin/datastore.rs: fix prune worker id

This commit is contained in:
Dietmar Maurer
2019-12-14 16:05:21 +01:00
parent e1c356ec06
commit 503995c767
2 changed files with 11 additions and 5 deletions

View File

@ -159,10 +159,12 @@ fn list_tasks(
None => continue, // skip
};
if info.upid.worker_type == "backup" || info.upid.worker_type == "restore" {
if info.upid.worker_type == "backup" || info.upid.worker_type == "restore" ||
info.upid.worker_type == "prune"
{
let prefix = format!("{}_", store);
if !worker_id.starts_with(&prefix) { continue; }
} else if info.upid.worker_type == "prune" || info.upid.worker_type == "garbage_collection" {
} else if info.upid.worker_type == "garbage_collection" {
if worker_id != store { continue; }
} else {
continue; // skip