nixos/mastodon: add assertion for only allowing one sidekiq scheduler queue

This commit is contained in:
Kerstin Humm 2023-04-06 16:12:51 +02:00
parent 9c8ff8b426
commit 431ccf26e4
No known key found for this signature in database
GPG Key ID: 40293358C7B9326B

View File

@ -513,6 +513,13 @@ in {
<option>services.mastodon.smtp.authenticate</option> is enabled.
'';
}
{
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\".";
}
];
environment.systemPackages = [ mastodonTootctl ];