Skip to content

Commit

Permalink
Bugfix parsing supervisor queues in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
bayram-aloware committed Mar 12, 2022
1 parent bdb7901 commit cadefdb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Middlewares/WorkloadResponseMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ private function getWildcards(): array
$env = config('app.env');

return collect(config('horizon.environments.' . $env))
->pluck('queue')
->flatten()
->filter(function ($item) {
return Str::contains($item, '*');
})
->values()
->all();
->pluck('queue')
->map(function ($queue) {
return $this->normalizeQueueName($queue);
})
->flatten()
->filter(function ($item) {
return Str::contains($item, '*');
})
->all();
}

private function normalizeQueueName($queue): array
Expand Down

0 comments on commit cadefdb

Please sign in to comment.