From c386b06fc6aac8d0a558ece70baaaa428beadb50 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 28 Sep 2020 15:32:11 +0200 Subject: [PATCH] server/worker_task: remove unecessary read_task_list 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 --- 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 { // 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, 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, 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, Error> { - update_active_workers(None) + Ok(()) } fn render_task_line(info: &TaskListInfo) -> String {