Skip to content

Commit

Permalink
Delete stories with a timestamp older than 30 days.
Browse files Browse the repository at this point in the history
Such stories might have had their data truncated by previous delete-old-data logic.
  • Loading branch information
johnwarden committed Nov 23, 2024
1 parent 90304ca commit 8bec50e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sql/delete-old-data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- delete data older than one month. It's taking about 18 days to fill a gig, and we have
-- 3 gig volume currently. That gives us 54 days. But 30 days is plenty and this gives us margin
-- in case the rate of growth of data increases.
delete from dataset join stories using id
where timestamp <= unixepoch()-30*24*60*60

0 comments on commit 8bec50e

Please sign in to comment.