From 372ada2726287521c28a9030c6961a937ea6ba56 Mon Sep 17 00:00:00 2001 From: Christian Ramseyer Date: Fri, 4 Oct 2019 23:40:23 +0200 Subject: [PATCH] netdisco-do overrides `_min_age` config Give the user wanting to manually run a discover|arpnip|macsuck job in the foreground preference over the respective `_min_age` setting. Tiny quality of life improvement that mostly comes up in debugging. --- bin/netdisco-do | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/netdisco-do b/bin/netdisco-do index fd00d83e..a751e288 100755 --- a/bin/netdisco-do +++ b/bin/netdisco-do @@ -148,12 +148,14 @@ else { foreach my $spec (@job_specs) { my $worker = MyWorker->new(); my $job = App::Netdisco::Backend::Job->new({ job => 0, %$spec }); + $CONFIG->{$1."_min_age"} = 0 if $job->action =~ m/^(arpnip|macsuck|discover)$/; my $actiontext = ( ($job->device ? ('['.$job->device->ip.']') : '') . ($job->action eq 'show' ? ('/'. ($job->subaction || 'interfaces')) : '') ); + # do job try { info sprintf '%s: %s started at %s',