Spaces:
Running on Zero
Running on Zero
Download scripts/retention_cleanup_shadow_logs.sql from aseemlais/ats-engine: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/spaces/aseemlais/ats-engine/resolve/main/scripts/retention_cleanup_shadow_logs.sql
- Command line
-
hf download hf://spaces/aseemlais/ats-engine/scripts/retention_cleanup_shadow_logs.sql
-
curl -L -o retention_cleanup_shadow_logs.sql https://huggingface.co/spaces/aseemlais/ats-engine/resolve/main/scripts/retention_cleanup_shadow_logs.sql
745 Bytes
| -- scripts/retention_cleanup_shadow_logs.sql | |
| -- ============================================================================= | |
| -- Scheduled Retention Cleanup Script for extraction_shadow_logs | |
| -- Default retention window: 30 days | |
| -- ============================================================================= | |
| -- Recommended execution: | |
| -- Option A: via pg_cron extension on Supabase: | |
| -- SELECT cron.schedule('cleanup-shadow-logs-daily', '0 3 * * *', $$ | |
| -- DELETE FROM "extraction_shadow_logs" WHERE "createdAt" < NOW() - INTERVAL '30 days'; | |
| -- $$); | |
| -- | |
| -- Option B: via scheduled maintenance job / GitHub Action / scripts/cleanup_retention.py | |
| DELETE FROM "extraction_shadow_logs" | |
| WHERE "createdAt" < NOW() - INTERVAL '30 days'; | |