diff --git a/lib/App/Netdisco/Backend/Worker/Manager.pm b/lib/App/Netdisco/Backend/Worker/Manager.pm index f6763f1e..176ca648 100644 --- a/lib/App/Netdisco/Backend/Worker/Manager.pm +++ b/lib/App/Netdisco/Backend/Worker/Manager.pm @@ -9,7 +9,7 @@ use Role::Tiny; use namespace::clean; use App::Netdisco::JobQueue - qw/jq_locked jq_getsome jq_getsomep jq_lock jq_prime_skiplist/; + qw/jq_locked jq_getsome jq_getsomep jq_lock jq_warm_thrusters/; sub worker_begin { my $self = shift; @@ -20,8 +20,8 @@ sub worker_begin { debug "entering Manager ($wid) worker_begin()"; - # rebuild device skip hints - jq_prime_skiplist; + # job queue initialisation + jq_warm_thrusters; # requeue jobs locally debug "mgr ($wid): searching for jobs booked to this processing node"; diff --git a/lib/App/Netdisco/JobQueue.pm b/lib/App/Netdisco/JobQueue.pm index 1c5a059e..875ec468 100644 --- a/lib/App/Netdisco/JobQueue.pm +++ b/lib/App/Netdisco/JobQueue.pm @@ -13,7 +13,7 @@ our @EXPORT_OK = qw/ jq_getsomep jq_locked jq_queued - jq_prime_skiplist + jq_warm_thrusters jq_log jq_userlog jq_lock @@ -58,11 +58,9 @@ Netdisco job instance interface (see below). Returns a list of IP addresses of devices which currently have a job of the given C<$job_type> queued (e.g. C, C, etc). -=head2 jq_prime_skiplist() +=head2 jq_warm_thrusters() -Sets up a table of hints for the backend daemon manager to help avoid picking -jobs from the queue that it cannot process due to C<*_no> configuration -settings. +Performs initialisation of the Job Queue backend. =head2 jq_log() diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index f76dfaee..e83bb79a 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -19,7 +19,7 @@ our @EXPORT_OK = qw/ jq_getsomep jq_locked jq_queued - jq_prime_skiplist + jq_warm_thrusters jq_lock jq_defer jq_complete @@ -114,7 +114,7 @@ sub _get_denied_actions { return @badactions; } -sub jq_prime_skiplist { +sub jq_warm_thrusters { $fqdn ||= (hostfqdn || 'localhost'); my @devices = schema('netdisco')->resultset('Device')->all; my $rs = schema('netdisco')->resultset('DeviceSkip');