use Module::Load tricks to avoid some other mess
This commit is contained in:
@@ -5,16 +5,16 @@ use Dancer qw/:moose :syntax :script/;
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
with 'App::Netdisco::Daemon::JobQueue::'. setting('job_queue');
|
||||
use Module::Load ();
|
||||
Module::Load::load_remote 'JobQueue' =>
|
||||
'App::Netdisco::JobQueue::' . setting('job_queue') => ':all';
|
||||
|
||||
requires qw/
|
||||
jq_get
|
||||
jq_getlocal
|
||||
jq_queued
|
||||
jq_lock
|
||||
jq_defer
|
||||
jq_complete
|
||||
jq_insert
|
||||
/;
|
||||
sub jq_get { shift and JobQueue::jq_get(@_) }
|
||||
sub jq_getlocal { shift and JobQueue::jq_getlocal(@_) }
|
||||
sub jq_queued { shift and JobQueue::jq_queued(@_) }
|
||||
sub jq_lock { shift and JobQueue::jq_lock(@_) }
|
||||
sub jq_defer { shift and JobQueue::jq_defer(@_) }
|
||||
sub jq_complete { shift and JobQueue::jq_complete(@_) }
|
||||
sub jq_insert { shift and JobQueue::jq_insert(@_) }
|
||||
|
||||
true;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package App::Netdisco::Daemon::JobQueue::PostgreSQL;
|
||||
|
||||
use App::Netdisco::JobQueue::PostgreSQL ();
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
sub jq_get { shift and App::Netdisco::JobQueue::PostgreSQL::jq_get(@_) }
|
||||
sub jq_getlocal { shift and App::Netdisco::JobQueue::PostgreSQL::jq_getlocal(@_) }
|
||||
sub jq_queued { shift and App::Netdisco::JobQueue::PostgreSQL::jq_queued(@_) }
|
||||
sub jq_lock { shift and App::Netdisco::JobQueue::PostgreSQL::jq_lock(@_) }
|
||||
sub jq_defer { shift and App::Netdisco::JobQueue::PostgreSQL::jq_defer(@_) }
|
||||
sub jq_complete { shift and App::Netdisco::JobQueue::PostgreSQL::jq_complete(@_) }
|
||||
sub jq_insert { shift and App::Netdisco::JobQueue::PostgreSQL::jq_insert(@_) }
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user