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 <d.csapak@proxmox.com>
This commit is contained in:
parent
6bcfc5c1a4
commit
c386b06fc6
@ -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
|
// atomically read/update the task list, update status of finished tasks
|
||||||
// new_upid is added to the list when specified.
|
// 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<Vec<TaskListInfo>, Error> {
|
|
||||||
|
|
||||||
let backup_user = crate::backup::backup_user()?;
|
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);
|
drop(lock);
|
||||||
|
|
||||||
finish_list.append(&mut active_list);
|
Ok(())
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_task_line(info: &TaskListInfo) -> String {
|
fn render_task_line(info: &TaskListInfo) -> String {
|
||||||
|
Loading…
Reference in New Issue
Block a user