From 2f73ec38271e6a9802ee01472f2cd62663d3e8a3 Mon Sep 17 00:00:00 2001 From: codl Date: Wed, 9 Aug 2017 12:40:41 +0200 Subject: [PATCH] reduce tweet archive retention to 3 days from 7 --- tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.py b/tasks.py index 7ed1846..bcc2ca4 100644 --- a/tasks.py +++ b/tasks.py @@ -112,8 +112,8 @@ def periodic_cleanup(): Session.query.filter(Session.updated_at < (db.func.now() - timedelta(hours=48))).\ delete(synchronize_session=False) - # delete twitter archives after 7 days - TwitterArchive.query.filter(TwitterArchive.updated_at < (db.func.now() - timedelta(days=7))).\ + # delete twitter archives after 3 days + TwitterArchive.query.filter(TwitterArchive.updated_at < (db.func.now() - timedelta(days=3))).\ delete(synchronize_session=False) # delete anonymous oauth tokens after 1 day