Created
June 28, 2023 07:19
-
-
Save u1-liquid/71ed28b0acc5ae4da02d6efc46272f34 to your computer and use it in GitHub Desktop.
Cleanup Meilisearch Tasks Database Weekly with Systemd-Timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Cleanup Meilisearch Tasks Database | |
After=meilisearch.service | |
[Service] | |
Type=oneshot | |
ExecStart=curl -v -H 'Authorization: Bearer MASTER_KEY' -X DELETE 'http://127.0.0.1:7700/tasks?statuses=failed,canceled,succeeded' | |
User=meilisearch | |
Group=meilisearch | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Scheduled Cleanup Meilisearch Tasks Database | |
[Timer] | |
OnCalendar=weekly | |
Persistent=true | |
Unit=meilisearch-cleanup-tasks.service | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment