reduce tweet archive retention to 3 days from 7

This commit is contained in:
codl 2017-08-09 12:40:41 +02:00
parent 3e5956db63
commit 2f73ec3827
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 2 deletions

View File

@ -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