move nbtstat and nbtwalk to worker plugins

This commit is contained in:
Oliver Gorwits
2017-09-09 14:46:00 +01:00
parent e7508a9eca
commit 271ef1a25c
7 changed files with 133 additions and 83 deletions

View File

@@ -0,0 +1,19 @@
package App::Netdisco::Worker::Plugin::Test;
use Dancer ':syntax';
use App::Netdisco::Worker::Plugin;
use aliased 'App::Netdisco::Worker::Status';
register_worker({ primary => true }, sub {
my ($job, $workerconf) = @_;
debug 'Test (primary) ran successfully.';
return Status->done('Test (primary) ran successfully.');
});
register_worker({ primary => false }, sub {
my ($job, $workerconf) = @_;
debug 'Test ran successfully.';
return Status->done('Test ran successfully.');
});
true;