summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-05-16 13:52:28 +0200
committerGitHub <noreply@github.com>2023-05-16 13:52:28 +0200
commitbcd46a36a76d3ae035eedde9ee70e9093fc2b32d (patch)
treeee94b4a3ec457d8fea66fb42528cbb3afcc36033
parentMerge pull request #231987 from r-ryantm/auto-update/libcouchbase (diff)
parentnixos/mastodon: fixup sidekiq jobClasses assertion (diff)
downloadnixpkgs-bcd46a36a76d3ae035eedde9ee70e9093fc2b32d.tar.gz
Merge pull request #227338 from erictapen/mastodon
-rw-r--r--nixos/modules/services/web-apps/mastodon.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix
index cf5329be489c..247eb707b15c 100644
--- a/nixos/modules/services/web-apps/mastodon.nix
+++ b/nixos/modules/services/web-apps/mastodon.nix
@@ -588,11 +588,12 @@ in {
'';
}
{
- assertion = 1 == builtins.length
- (lib.mapAttrsToList
- (_: v: builtins.elem "scheduler" v.jobClasses || v.jobClasses == [ ])
- cfg.sidekiqProcesses);
- message = "There must be one and only one Sidekiq queue in services.mastodon.sidekiqProcesses with jobClass \"scheduler\".";
+ assertion = 1 ==
+ (lib.count (x: x)
+ (lib.mapAttrsToList
+ (_: v: builtins.elem "scheduler" v.jobClasses || v.jobClasses == [ ])
+ cfg.sidekiqProcesses));
+ message = "There must be exactly one Sidekiq queue in services.mastodon.sidekiqProcesses with jobClass \"scheduler\".";
}
];