some reengineering to support proper testing
This commit is contained in:
@@ -5,9 +5,11 @@ use Dancer::Plugin;
|
||||
|
||||
use App::Netdisco::Util::Permission qw/check_acl_no check_acl_only/;
|
||||
use aliased 'App::Netdisco::Worker::Status';
|
||||
|
||||
use Scope::Guard 'guard';
|
||||
|
||||
Dancer::Factory::Hook->instance()->install_hooks("nd2_core_${_}")
|
||||
for qw/check early main user/;
|
||||
|
||||
register 'register_worker' => sub {
|
||||
my ($self, $first, $second) = plugin_args(@_);
|
||||
|
||||
@@ -76,7 +78,7 @@ register 'register_worker' => sub {
|
||||
};
|
||||
|
||||
# store the built worker as Worker.pm will build the dispatch order later on
|
||||
push @{ vars->{'workers'}
|
||||
push @{ vars->{'workers'}->{$workerconf->{action}}
|
||||
->{$workerconf->{phase}}
|
||||
->{$workerconf->{namespace}}
|
||||
->{$workerconf->{priority}} }, $worker;
|
||||
|
||||
Reference in New Issue
Block a user