Skip to content
Snippets Groups Projects
Verified Commit 2919ad8d authored by Štěpán Henek's avatar Štěpán Henek :bear:
Browse files

dbscripts: purge celery_taskmeta table

parent 3f926ba4
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ DATE=$(date -d "$CLEAN_DAYS days ago" "+'%Y-%m-%d'")
echo "DELETE FROM router_registrationcode WHERE date < $DATE;"
echo "DELETE FROM biflows WHERE COALESCE(start_in, start_out) < $DATE;"
echo "DELETE FROM ssh_sessions WHERE start_time < $DATE;"
echo "DELETE FROM celery_taskmeta WHERE date_done < $DATE;"
echo "LOCK TABLE fake_blacklist_cache IN SHARE MODE;" # We don't want to conflict with any other updates running
echo "DELETE FROM fake_blacklist_cache;"
echo "INSERT INTO fake_blacklist_cache (server, remote, client, score, timestamp) SELECT server, remote, client, score, timestamp FROM fake_blacklist_cache_fill;"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment