only abort lock if action matches badactions
This commit is contained in:
@@ -151,7 +151,7 @@ sub jq_lock {
|
||||
backend => $fqdn, device => $job->device,
|
||||
},{ key => 'device_skip_pkey' })->add_to_actionset(@badactions);
|
||||
|
||||
return false;
|
||||
return false if scalar grep {$_ eq $job->action} @badactions;
|
||||
}
|
||||
|
||||
# lock db row and update to show job has been picked
|
||||
|
||||
@@ -219,9 +219,6 @@ sub is_arpnipable {
|
||||
my $ip = shift;
|
||||
my $device = get_device($ip) or return 0;
|
||||
|
||||
return _bail_msg("is_arpnipable: cannot arpnip an undiscovered device")
|
||||
if not $device->in_storage;
|
||||
|
||||
return _bail_msg("is_arpnipable: device matched arpnip_no")
|
||||
if check_acl_no($device, 'arpnip_no');
|
||||
|
||||
@@ -273,9 +270,6 @@ sub is_macsuckable {
|
||||
my $ip = shift;
|
||||
my $device = get_device($ip) or return 0;
|
||||
|
||||
return _bail_msg("is_macsuckable: cannot macsuck an undiscovered device")
|
||||
if not $device->in_storage;
|
||||
|
||||
return _bail_msg("is_macsuckable: device matched macsuck_no")
|
||||
if check_acl_no($device, 'macsuck_no');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user