Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
my $authuser = $rpcenv->get_user();
my $tlist = PVE::Cluster::get_tasklist();
-
- my $res = [];
-
- return $res if !$tlist;
+ return [] if !$tlist;
my $all = $rpcenv->check($authuser, "/", [ 'Sys.Audit' ], 1);
+ my $res = [];
foreach my $task (@$tlist) {
if (PVE::AccessControl::pve_verify_tokenid($task->{user}, 1)) {
($task->{user}, $task->{tokenid}) = PVE::AccessControl::split_tokenid($task->{user});
}
sub update_status {
-
- # update worker list. This is not really required and
- # we just call this to make sure that we have a correct
- # list in case of an unexpected crash.
+ # update worker list. This is not really required, but we want to make sure that we also have a
+ # correct list in case of an unexpected crash.
my $rpcenv = PVE::RPCEnvironment::get();
eval {