only do device_skip for device jobs
This commit is contained in:
@@ -101,6 +101,7 @@ sub jq_queued {
|
|||||||
sub _get_denied_actions {
|
sub _get_denied_actions {
|
||||||
my $device = shift;
|
my $device = shift;
|
||||||
my @badactions = ();
|
my @badactions = ();
|
||||||
|
return @badactions unless $device;
|
||||||
|
|
||||||
push @badactions, ('discover', @{ setting('job_prio')->{high} })
|
push @badactions, ('discover', @{ setting('job_prio')->{high} })
|
||||||
if not is_discoverable($device);
|
if not is_discoverable($device);
|
||||||
@@ -142,6 +143,7 @@ sub jq_lock {
|
|||||||
$fqdn ||= (hostfqdn || 'localhost');
|
$fqdn ||= (hostfqdn || 'localhost');
|
||||||
my $happy = false;
|
my $happy = false;
|
||||||
|
|
||||||
|
if ($job->device) {
|
||||||
# need to handle device discovered since backend daemon started
|
# need to handle device discovered since backend daemon started
|
||||||
# and the skiplist was primed. these should be checked against
|
# and the skiplist was primed. these should be checked against
|
||||||
# the various acls and have device_skip entry added if needed,
|
# the various acls and have device_skip entry added if needed,
|
||||||
@@ -154,6 +156,7 @@ sub jq_lock {
|
|||||||
|
|
||||||
return false if scalar grep {$_ eq $job->action} @badactions;
|
return false if scalar grep {$_ eq $job->action} @badactions;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# lock db row and update to show job has been picked
|
# lock db row and update to show job has been picked
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user