[pbs-devel] [PATCH proxmox-backup v2 8/9] server/worker_task: remove unecessary read_task_list
Dominik Csapak
d.csapak at proxmox.com
Mon Sep 28 15:32:11 CEST 2020
since there are no users of this anymore and we now have a nicer
TaskListInfoIterator to use, we can drop this function
this also means that 'update_active_workers' does not need to return
a list anymore since we never used that result besides in
read_task_list
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/server/worker_task.rs | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/server/worker_task.rs b/src/server/worker_task.rs
index a2189596..2a343709 100644
--- a/src/server/worker_task.rs
+++ b/src/server/worker_task.rs
@@ -341,8 +341,7 @@ fn lock_task_list_files(exclusive: bool) -> Result<std::fs::File, Error> {
// atomically read/update the task list, update status of finished tasks
// new_upid is added to the list when specified.
-// Returns a sorted list of known tasks,
-fn update_active_workers(new_upid: Option<&UPID>) -> Result<Vec<TaskListInfo>, Error> {
+fn update_active_workers(new_upid: Option<&UPID>) -> Result<(), Error> {
let backup_user = crate::backup::backup_user()?;
@@ -424,16 +423,7 @@ fn update_active_workers(new_upid: Option<&UPID>) -> Result<Vec<TaskListInfo>, E
drop(lock);
- finish_list.append(&mut active_list);
- finish_list.reverse();
- Ok(finish_list)
-}
-
-/// Returns a sorted list of known tasks
-///
-/// The list is sorted by `(starttime, endtime)` in ascending order
-pub fn read_task_list() -> Result<Vec<TaskListInfo>, Error> {
- update_active_workers(None)
+ Ok(())
}
fn render_task_line(info: &TaskListInfo) -> String {
--
2.20.1
More information about the pbs-devel
mailing list