introduce noop and refactor checks in all workers

This commit is contained in:
Oliver Gorwits
2017-10-06 07:15:59 +01:00
parent 98463c8cad
commit 3af13f0dfe
26 changed files with 172 additions and 55 deletions

View File

@@ -8,6 +8,10 @@ use App::Netdisco::JobQueue qw/jq_queued jq_insert/;
use Dancer::Plugin::DBIC 'schema';
register_worker({ stage => 'check' }, sub {
return Status->done('Discoverall is able to run');
});
register_worker({ stage => 'main' }, sub {
my ($job, $workerconf) = @_;
my %queued = map {$_ => 1} jq_queued('discover');