allow two forms of worker declaration, and update docs

This commit is contained in:
Oliver Gorwits
2017-09-05 22:39:22 +01:00
parent a79cb9a9e4
commit 36c70220a2
3 changed files with 37 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ use App::Netdisco::Worker::Plugin;
use aliased 'App::Netdisco::Worker::Status';
register_worker({} => sub {
register_worker(sub {
my ($job, $workerconf) = @_;
my ($device, $port, $extra) = map {$job->$_} qw/device port extra/;