mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2025-12-24 02:40:20 +01:00
fix generating multiple upstreams of same type
This commit is contained in:
3
lib.nix
3
lib.nix
@@ -28,8 +28,7 @@ rec {
|
|||||||
|
|
||||||
# Subindex by resource names, listener types, and convert to upstreams
|
# Subindex by resource names, listener types, and convert to upstreams
|
||||||
(lib.mapAttrs (_: workers: lib.pipe workers [
|
(lib.mapAttrs (_: workers: lib.pipe workers [
|
||||||
(lib.concatMap (worker: worker.settings.worker_listeners))
|
(lib.concatMap (worker: [ (lib.lists.head worker.settings.worker_listeners) ]))
|
||||||
lib.lists.head # only select one listener for the worker to avoid cache thrashing
|
|
||||||
lib.flatten
|
lib.flatten
|
||||||
mapListenersToUpstreamsByType
|
mapListenersToUpstreamsByType
|
||||||
]))
|
]))
|
||||||
|
|||||||
Reference in New Issue
Block a user