Skip to content

Instantly share code, notes, and snippets.

@u1-liquid
Created June 28, 2023 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u1-liquid/71ed28b0acc5ae4da02d6efc46272f34 to your computer and use it in GitHub Desktop.
Save u1-liquid/71ed28b0acc5ae4da02d6efc46272f34 to your computer and use it in GitHub Desktop.
Cleanup Meilisearch Tasks Database Weekly with Systemd-Timer
[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
[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