Add maintenance scripts
This commit is contained in:
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
DB_FILE="/opt/appfactory/data/appfactory/appfactory.db"
|
||||
|
||||
echo "Deleting service health records older than 30 days..."
|
||||
|
||||
sqlite3 "$DB_FILE" "
|
||||
DELETE FROM service_health
|
||||
WHERE checked_at < datetime('now','-30 day');
|
||||
"
|
||||
|
||||
echo "Done."
|
||||
Reference in New Issue
Block a user