From 596d2454d661dcdf0076f433f97aff2ba02a2c89 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 7 Jun 2018 21:50:43 +0100 Subject: [PATCH] fix bug in reuse of $worker for prefix actions --- bin/netdisco-do | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/netdisco-do b/bin/netdisco-do index 385b3785..13a07772 100755 --- a/bin/netdisco-do +++ b/bin/netdisco-do @@ -101,7 +101,6 @@ unless ($action) { use Moo; with 'App::Netdisco::Worker::Runner'; } -my $worker = MyWorker->new(); my $net = NetAddr::IP->new($device); if ($device and (!$net or $net->num == 0 or $net->addr eq '0.0.0.0')) { @@ -137,6 +136,7 @@ if ($queue_only) { } else { foreach my $spec (@job_specs) { + my $worker = MyWorker->new(); my $job = App::Netdisco::Backend::Job->new({ job => 0, %$spec }); my $actiontext = (