]> git.proxmox.com Git - proxmox-backup.git/commit
server/worker_task: split task list file into two
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 28 Sep 2020 13:32:06 +0000 (15:32 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Sep 2020 06:38:28 +0000 (08:38 +0200)
commit784fa1c2e3919da104ef1b7889e195eaeb745509
treef72891e2826b14df276cfe7ee68c51ba873f3576
parent66f4e6a8091d74712bd15925636f8d10501839d7
server/worker_task: split task list file into two

one for only the active tasks and one for up to 1000 finished tasks

factor out the parsing of a task file (we will later need this again)
and use iterator combinators for easier code

we now sort the tasks ascending (this will become important in a later patch)
but reverse (for now) it to keep compatibility

this code also omits the converting into an intermittent hash
since it cannot really happen that we have duplicate tasks in this list
(since the call is locked by an flock, and it is the only place where we
write into the lists)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/server/worker_task.rs