set up list of jobs the backend instance should skip

This commit is contained in:
Oliver Gorwits
2017-05-22 22:52:51 +01:00
parent 3a0019296d
commit 96ed444bbb
3 changed files with 59 additions and 1 deletions

View File

@@ -8,7 +8,8 @@ use App::Netdisco::Util::Backend;
use Role::Tiny;
use namespace::clean;
use App::Netdisco::JobQueue qw/jq_locked jq_getsome jq_getsomep jq_lock/;
use App::Netdisco::JobQueue
qw/jq_locked jq_getsome jq_getsomep jq_lock jq_prime_skiplist/;
sub worker_begin {
my $self = shift;
@@ -19,6 +20,9 @@ sub worker_begin {
debug "entering Manager ($wid) worker_begin()";
# rebuild device skip hints
jq_prime_skiplist;
# requeue jobs locally
debug "mgr ($wid): searching for jobs booked to this processing node";
my @jobs = jq_locked;