From 14ac69dc2e38899befbd6494a18d84e5d5891d1c Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 3 Sep 2019 13:00:22 +0100 Subject: [PATCH] might as well make other *walk not care about pseudo and use layers instead --- lib/App/Netdisco/Worker/Plugin/Macwalk.pm | 5 ++--- lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/App/Netdisco/Worker/Plugin/Macwalk.pm b/lib/App/Netdisco/Worker/Plugin/Macwalk.pm index 01d49b85b..9bb964044 100644 --- a/lib/App/Netdisco/Worker/Plugin/Macwalk.pm +++ b/lib/App/Netdisco/Worker/Plugin/Macwalk.pm @@ -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([ diff --git a/lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm b/lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm index 72d0c26f5..f097260d7 100644 --- a/lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm +++ b/lib/App/Netdisco/Worker/Plugin/Nbtwalk.pm @@ -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([