Skip to content

Commit 0bc77fe

Browse files
authoredMay 18, 2024··
Merge pull request #2 from MammatusPHP/pivot-to-generic-deployments-for-split-out-queue-workers
Pivot to generic deployments for split out queue workers
2 parents 16d0d42 + cb9d5be commit 0bc77fe

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎src/Kubernetes/Helm/QueueConsumersValues.php

+11-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ final class QueueConsumersValues extends AbstractList_ implements Listener
1616
public function values(Values $values): void
1717
{
1818
$values->registry->add(
19-
'queues',
20-
array_filter(
21-
[...$this->workers()],
22-
static fn (Worker $worker): bool => $worker->type === 'kubernetes',
19+
'deployments',
20+
array_map(
21+
static fn (Worker $worker): array => [
22+
'name' => 'queue-worker-' . str_replace('.', '-', $worker->queue),
23+
'command' => 'mammatus-queue',
24+
'arguments' => [$worker->class],
25+
],
26+
array_filter(
27+
[...$this->workers()],
28+
static fn (Worker $worker): bool => $worker->type === 'kubernetes',
29+
),
2330
),
2431
);
2532
}

0 commit comments

Comments
 (0)
Please sign in to comment.