]> git.proxmox.com Git - proxmox-backup.git/commit
proxy: fix error handling in prune scheduling
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 24 Sep 2020 14:13:53 +0000 (16:13 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 24 Sep 2020 15:06:09 +0000 (17:06 +0200)
commit6c25588e637930c22a1334e7a1fe9292fd2f2222
tree3aefd966275ced40ba0988ca5bf6f1b710b2780f
parent17a1f579d0ad0552186583ead5160ac6c32de828
proxy: fix error handling in prune scheduling

we rely on the jobstate handling to write the error of the worker
into its state file, but we used '?' here in a block which does not
return the error to the block, but to the function/closure instead

so if a prune job failed because of such an '?', we did not write
into the statefile and got a wrong state there

instead use our try_block! macro that wraps the code in a closure

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/bin/proxmox-backup-proxy.rs