mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
feat: added elastic search script to mastodon
This commit is contained in:
parent
11e51030e0
commit
2d551d716c
1 changed files with 37 additions and 9 deletions
|
|
@ -270,6 +270,23 @@ in
|
|||
mastodon-sidekiq-mailers.serviceConfig.PrivateMounts = lib.mkForce false;
|
||||
mastodon-sidekiq-push-pull.serviceConfig.PrivateMounts = lib.mkForce false;
|
||||
|
||||
mastodon-elastic-search = {
|
||||
description = "Recache elastic search";
|
||||
after = [
|
||||
"network-online.target"
|
||||
"mastodon-web.service"
|
||||
];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
WorkingDirectory = "/var/lib/${serviceCfg.name}";
|
||||
Type = "oneshot";
|
||||
# Remove RemainAfterExit for recurring tasks
|
||||
};
|
||||
script = ''
|
||||
mastodon-tootctl search deploy --only-mapping --only=instances accounts tags statuses public_statuses
|
||||
'';
|
||||
};
|
||||
|
||||
mastodon-copy-secrets = {
|
||||
description = "Copy secrets from virtiofs to local filesystem";
|
||||
before = [ "mastodon-init-dirs.service" ];
|
||||
|
|
@ -364,16 +381,27 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
timers.fedifetcher = {
|
||||
description = "Timer for FediFetcher";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timers = {
|
||||
mastodon-elastic-search = {
|
||||
description = "Timer for Mastodon elastic search recaching";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "10min";
|
||||
OnUnitActiveSec = "60min";
|
||||
Unit = "mastodon-elastic-search.service";
|
||||
};
|
||||
};
|
||||
|
||||
timerConfig = {
|
||||
OnBootSec = "10min";
|
||||
OnUnitActiveSec = "15min";
|
||||
Unit = "fedifetcher.service";
|
||||
Persistent = true;
|
||||
AccuracySec = "1min";
|
||||
fedifetcher = {
|
||||
description = "Timer for FediFetcher";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "10min";
|
||||
OnUnitActiveSec = "15min";
|
||||
Unit = "fedifetcher.service";
|
||||
Persistent = true;
|
||||
AccuracySec = "1min";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue