fix generating multiple upstreams of same type

master
Daniel Lovbrotte Olsen 2024-03-13 07:39:59 +01:00
parent 19b85a2562
commit 6c9b67974b
1 changed files with 1 additions and 2 deletions

View File

@ -28,8 +28,7 @@ rec {
# Subindex by resource names, listener types, and convert to upstreams
(lib.mapAttrs (_: workers: lib.pipe workers [
(lib.concatMap (worker: worker.settings.worker_listeners))
lib.lists.head # only select one listener for the worker to avoid cache thrashing
(lib.concatMap (worker: [ (lib.lists.head worker.settings.worker_listeners) ]))
lib.flatten
mapListenersToUpstreamsByType
]))