change to init, first, second stages

This commit is contained in:
Oliver Gorwits
2017-09-10 16:09:45 +01:00
parent 5f2da69697
commit 64a9491115
34 changed files with 74 additions and 63 deletions

View File

@@ -7,7 +7,7 @@ use aliased 'App::Netdisco::Worker::Status';
use NetAddr::IP qw/:rfc3021 :lower/;
use App::Netdisco::Util::Device qw/get_device renumber_device/;
register_worker({ primary => true }, sub {
register_worker({ stage => 'init' }, sub {
my ($job, $workerconf) = @_;
my ($device, $port, $extra) = map {$job->$_} qw/device port extra/;
return Status->error('Missing device (-d).') if !defined $device;