Skip to content

Commit

Permalink
Merge pull request #2 from MammatusPHP/pivot-to-generic-deployments-f…
Browse files Browse the repository at this point in the history
…or-split-out-queue-workers

Pivot to generic deployments for split out queue workers
  • Loading branch information
WyriHaximus authored May 18, 2024
2 parents 16d0d42 + cb9d5be commit 0bc77fe
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Kubernetes/Helm/QueueConsumersValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ final class QueueConsumersValues extends AbstractList_ implements Listener
public function values(Values $values): void
{
$values->registry->add(
'queues',
array_filter(
[...$this->workers()],
static fn (Worker $worker): bool => $worker->type === 'kubernetes',
'deployments',
array_map(
static fn (Worker $worker): array => [
'name' => 'queue-worker-' . str_replace('.', '-', $worker->queue),
'command' => 'mammatus-queue',
'arguments' => [$worker->class],
],
array_filter(
[...$this->workers()],
static fn (Worker $worker): bool => $worker->type === 'kubernetes',
),
),
);
}
Expand Down

0 comments on commit 0bc77fe

Please sign in to comment.