-Sometimes extracting a view on an inprogress task can go awry if the task completes in the middle of thinking
ignore that case git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6695 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
7a7c11650c
commit
3482b19554
@ -760,8 +760,13 @@ sub process_tasks {
|
||||
}
|
||||
if ($state eq 'running' and not $running_tasks{$_}->{questionasked}) { # and $curt->info->progress == 95) { #This is unfortunate, there should be a 'state' to indicate a question is blocking
|
||||
#however there isn't, so if we see something running at 95%, we just manually see if a question blocked the rest
|
||||
my $vm = $curcon->get_view(mo_ref=>$curt->info->entity);
|
||||
if ($vm->{summary} and $vm->summary->{runtime} and $vm->summary->runtime->{question} and $vm->summary->runtime->question) {
|
||||
my $vm;
|
||||
$@="";
|
||||
eval {
|
||||
$vm = $curcon->get_view(mo_ref=>$curt->info->entity);
|
||||
};
|
||||
if ($@) { $vm = 0; }
|
||||
if ($vm and $vm->{summary} and $vm->summary->{runtime} and $vm->summary->runtime->{question} and $vm->summary->runtime->question) {
|
||||
$running_tasks{$_}->{questionasked}=1;
|
||||
$running_tasks{$_}->{callback}->($curt,$running_tasks{$_}->{data},$vm->summary->runtime->question,$vm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user