Skip to content
Snippets Groups Projects
Unverified Commit cc93b862 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

purge: Group the celery deletes together with firewalls

They are related, so put them together. Its just nicer this way, no real
change.
parent 2919ad8d
Branches
No related merge requests found
......@@ -16,11 +16,11 @@ DATE=$(date -d "$CLEAN_DAYS days ago" "+'%Y-%m-%d'")
for TABLE in $BATCH_TABLES ; do
echo "DELETE FROM $TABLE WHERE batch < $DATE;"
done
echo "DELETE FROM celery_taskmeta WHERE date_done < $DATE;"
echo "DELETE FROM router_loggedpacket WHERE created_at < $DATE;"
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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment