more sidekiq threads for masto for it to be able to keep up

This commit is contained in:
Cyryl Płotnicki 2023-12-23 13:37:40 +00:00
parent 584f768be2
commit 0fa7c214e8

View file

@ -31,6 +31,7 @@
members = ["${systemUserName}" "nginx"]; members = ["${systemUserName}" "nginx"];
}; };
}; };
tootctlPath = "/run/current-system/sw/bin/mastodon-tootctl";
secretSettings = { secretSettings = {
owner = systemUserName; owner = systemUserName;
group = systemGroupName; group = systemGroupName;
@ -126,13 +127,15 @@ in {
systemd.services.mastodon-media-auto-remove = { systemd.services.mastodon-media-auto-remove = {
description = "Mastodon media auto remove"; description = "Mastodon media auto remove";
serviceConfig = { serviceConfig = {
User = systemUserName;
Group = systemGroupName;
Type = "oneshot"; Type = "oneshot";
EnvironmentFile = "/var/lib/mastodon/.secrets_env"; EnvironmentFile = "/var/lib/mastodon/.secrets_env";
}; };
script = '' script = ''
/run/current-system/sw/bin/mastodon-tootctl media remove --days=8 --prune-profiles --include-follows -c1 ${tootctlPath} media remove --days=8 --prune-profiles --include-follows -c1
/run/current-system/sw/bin/mastodon-tootctl media remove --days=8 --remove-headers --include-follows -c1 ${tootctlPath} media remove --days=8 --remove-headers --include-follows -c1
/run/current-system/sw/bin/mastodon-tootctl preview_cards remove --days=8 ${tootctlPath} preview_cards remove --days=8
''; '';
startAt = "daily"; startAt = "daily";
}; };
@ -153,7 +156,7 @@ in {
createLocally = false; createLocally = false;
passwordFile = "${mailgunSmtpPasswordPath}"; passwordFile = "${mailgunSmtpPasswordPath}";
}; };
sidekiqThreads = 2; sidekiqThreads = 8;
extraConfig = { extraConfig = {
SMTP_TLS = "true"; SMTP_TLS = "true";
SMTP_ENABLE_STARTTLS_AUTO = "true"; SMTP_ENABLE_STARTTLS_AUTO = "true";