]> git.proxmox.com Git - proxmox-backup.git/commit
api2/node/tasks: use TaskListInfoIterator instead of read_task_list
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 28 Sep 2020 13:32:09 +0000 (15:32 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Sep 2020 06:40:02 +0000 (08:40 +0200)
commit768e10d0b32dc6a89dc2f5cd59a77beb177bee73
tree7b8091ec48c69ebce111f6e7a3fbb2f5b14b454a
parente7244387c712f418c1f13b2fff02f1a10fad49c8
api2/node/tasks: use TaskListInfoIterator instead of read_task_list

this makes the filtering/limiting much nicer and readable

since we now have potentially an 'infinite' amount of tasks we iterate over,
and cannot now beforehand how many there are, we return the total count
as always 1 higher then requested iff we are not at the end (this is
the case when the amount of entries is smaller than the requested limit)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/api2/node/tasks.rs