a bunch of logic changes to allow tests to run standalone

This commit is contained in:
Oliver Gorwits
2021-08-12 10:58:55 +01:00
parent f1224b087c
commit d206b9ccbf
5 changed files with 23 additions and 17 deletions

View File

@@ -2,9 +2,14 @@ package App::Netdisco::JobQueue;
use Dancer qw/:moose :syntax :script/;
BEGIN {
$ENV{ND_QUEUE_ENGINE} ||=
setting('workers') ? setting('workers')->{queue} : 'PostgreSQL';
}
use Module::Load ();
Module::Load::load
'App::Netdisco::JobQueue::' . setting('workers')->{queue} => ':all';
'App::Netdisco::JobQueue::' . $ENV{ND_QUEUE_ENGINE} => ':all';
use base 'Exporter';
our @EXPORT = ();