0
2
mirror of https://github.com/dali99/nixos-matrix-modules.git synced 2026-07-18 03:30:31 +02:00

generate only one upstream per worker

This commit is contained in:
2024-03-13 06:22:24 +01:00
parent b8d7c76a7e
commit d48997cfb4
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -29,6 +29,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.flatten
mapListenersToUpstreamsByType
]))