diff --git a/lib/App/Netdisco/Backend/Job.pm b/lib/App/Netdisco/Backend/Job.pm index 34e97f1b..4b8429f7 100644 --- a/lib/App/Netdisco/Backend/Job.pm +++ b/lib/App/Netdisco/Backend/Job.pm @@ -93,6 +93,8 @@ sub best_status { my $cur_level = 0; my $cur_status = ''; + return Status->error()->status if $job->is_cancelled; + foreach my $status (reverse @{ $job->_statuslist }) { next if $status->phase and $status->phase !~ m/^(?:early|main|store|late)$/; @@ -122,6 +124,12 @@ sub finalise_status { my $max_level = Status->error()->level; + if ($job->is_cancelled and scalar @{ $job->_statuslist }) { + $job->status( $job->_statuslist->[-1]->status ); + $job->log( $job->_statuslist->[-1]->log ); + return; + } + foreach my $status (reverse @{ $job->_statuslist }) { next if $status->phase and $status->phase !~ m/^(?:check|early|main|store|late)$/; diff --git a/share/config.yml b/share/config.yml index c3c22297..6b5842fd 100644 --- a/share/config.yml +++ b/share/config.yml @@ -233,7 +233,7 @@ snmpretries: 2 snmp_remoteport: {} snmp_field_protection: device: - serial: ['any'] + serial: ['group:__ANY__'] devices_no: [] devices_only: [] discover_no: []