make sure internal plugin asciibetical load order is preserved

This commit is contained in:
Oliver Gorwits
2023-09-27 14:13:40 +01:00
parent 582163aa3e
commit 3a160206a1
2 changed files with 4 additions and 2 deletions

View File

@@ -49,7 +49,9 @@ sub load_workers {
and exists vars->{'workers'}->{'internal'}->{$phase};
my $internal = vars->{'workers'}->{'internal'};
foreach my $namespace (keys %{ $internal->{$phase} }) {
# the namespace of an internal worker is actually the worker name so must
# be sorted in order to "preserve" the plugin load order
foreach my $namespace (sort keys %{ $internal->{$phase} }) {
foreach my $priority (keys %{ $internal->{$phase}->{$namespace} }) {
push @{ $workers->{$phase}->{'__internal__'}->{$priority} },
@{ $internal->{$phase}->{$namespace}->{$priority} };