no need to debug log if there are no hooks in phase

This commit is contained in:
Oliver Gorwits
2017-10-01 10:49:12 +01:00
parent 3b32e84312
commit 98463c8cad

View File

@@ -75,6 +75,7 @@ sub run_workers {
my $store = Dancer::Factory::Hook->instance(); my $store = Dancer::Factory::Hook->instance();
(my $phase = $hook) =~ s/^nd2_core_//; (my $phase = $hook) =~ s/^nd2_core_//;
return unless scalar @{ $store->get_hooks_for($hook) };
debug "running workers for hook: $hook"; debug "running workers for hook: $hook";
foreach my $worker (@{ $store->get_hooks_for($hook) }) { foreach my $worker (@{ $store->get_hooks_for($hook) }) {