fix nockeck parameter in active_workers

This commit is contained in:
Dietmar Maurer 2011-10-13 11:53:12 +02:00
parent 5bf71a968e
commit d33d0735a9

View File

@ -334,9 +334,9 @@ sub active_workers {
my $thash = {}; # only list task once
my $check_task = sub {
my ($task) = @_;
my ($task, $running) = @_;
if (PVE::ProcFSTools::check_process_running($task->{pid}, $task->{pstart})) {
if ($running || PVE::ProcFSTools::check_process_running($task->{pid}, $task->{pstart})) {
push @$tlist, $task;
} else {
delete $task->{pid};
@ -356,7 +356,7 @@ sub active_workers {
$task = PVE::Tools::upid_decode($new_upid);
$task->{upid} = $new_upid;
$thash->{$new_upid} = $task;
&$check_task($task) if !$nocheck;
&$check_task($task, $nocheck);
}