Skip to content

Commit

Permalink
might as well make other *walk not care about pseudo and use layers i…
Browse files Browse the repository at this point in the history
…nstead
  • Loading branch information
ollyg committed Sep 3, 2019
1 parent 82a99ea commit 14ac69d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/App/Netdisco/Worker/Plugin/Macwalk.pm
Expand Up @@ -11,9 +11,8 @@ register_worker({ phase => 'main' }, sub {
my ($job, $workerconf) = @_;

my %queued = map {$_ => 1} jq_queued('macsuck');
my @devices = schema('netdisco')->resultset('Device')->search({
-or => [ 'vendor' => undef, 'vendor' => { '!=' => 'netdisco' }],
})->has_layer('2')->get_column('ip')->all;
my @devices = schema('netdisco')->resultset('Device')
->has_layer('2')->get_column('ip')->all;
my @filtered_devices = grep {!exists $queued{$_}} @devices;

jq_insert([
Expand Down
5 changes: 2 additions & 3 deletions lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm
Expand Up @@ -11,9 +11,8 @@ register_worker({ phase => 'main' }, sub {
my ($job, $workerconf) = @_;

my %queued = map {$_ => 1} jq_queued('nbtstat');
my @devices = schema('netdisco')->resultset('Device')->search({
-or => [ 'vendor' => undef, 'vendor' => { '!=' => 'netdisco' }],
})->has_layer('2')->get_column('ip')->all;
my @devices = schema('netdisco')->resultset('Device')
->has_layer('2')->get_column('ip')->all;
my @filtered_devices = grep {!exists $queued{$_}} @devices;

jq_insert([
Expand Down

0 comments on commit 14ac69d

Please sign in to comment.