]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
allow workers to count warnings and finish tasks in a WARNINGS state
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 9 Apr 2021 08:44:35 +0000 (10:44 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 12:35:55 +0000 (14:35 +0200)
commitff79ee6596f2a40a73c8fc388ff75b7536f8030d
tree90581e58f36f665f15df92eefca577060626525e
parent6b00e70cd18d64e6c7eedfbba31654ac91eb5782
allow workers to count warnings and finish tasks in a WARNINGS state

as is already supported by the UI (and PBS).

A nice bonus is that warn() can be used by both workers and non-workers. For
workers, the output is redirected/duplicated as set up by {fork,tee}_worker(),
and non-erroring workers that issued a warning will end in a WARNINGS state.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/RESTEnvironment.pm
src/PVE/Tools.pm