[pbs-devel] [PATCH proxmox-backup 04/10] server/worker_task: split task list file into two

Dietmar Maurer dietmar at proxmox.com
Mon Sep 28 07:43:59 CEST 2020


> +    let mut finish_list: Vec<TaskListInfo> = read_task_file_from_path(PROXMOX_BACKUP_INDEX_TASK_FN)?;
> +    let mut active_list: Vec<TaskListInfo> = read_task_file_from_path(PROXMOX_BACKUP_ACTIVE_TASK_FN)?
> +        .into_iter()
> +        .filter_map(|info| {
> +            if info.state.is_some() { // should not happen?
> +                finish_list.push(info);
> +                return None;
>              }

Those files have different formats now, so I would use a different parser. That way
we can avoid that "should not happen?" code...





More information about the pbs-devel mailing list