From 6c9b67974b839740e2a738958512c7a704481157 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Wed, 13 Mar 2024 07:39:59 +0100 Subject: [PATCH] fix generating multiple upstreams of same type --- lib.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib.nix b/lib.nix index 24a769d..1b96ab7 100644 --- a/lib.nix +++ b/lib.nix @@ -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 ]))