From 741190e5f0df8b10f24f9896e484405f868f4553 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 4 Oct 2021 14:10:52 +0100 Subject: [PATCH] add helpful comment --- lib/App/Netdisco/Worker/Plugin.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/App/Netdisco/Worker/Plugin.pm b/lib/App/Netdisco/Worker/Plugin.pm index 840da37f..efbbefee 100644 --- a/lib/App/Netdisco/Worker/Plugin.pm +++ b/lib/App/Netdisco/Worker/Plugin.pm @@ -45,7 +45,10 @@ register 'register_worker' => sub { # support part-actions via action::namespace if ($job->only_namespace and $workerconf->{phase} ne 'check') { + # skip namespaces not the requested ::namespace return unless $workerconf->{namespace} eq lc( $job->only_namespace ) + # apart from discover::properties which needs to run, so that's early + # phase for unknown devices, but not ::hooks/early (if implemented) or (($job->only_namespace ne 'hooks') and ($workerconf->{phase} eq 'early') and ($job->device and not $job->device->in_storage)); }