FitTrackee/fittrackee/oauth2/clean.py

10 lines
232 B
Python
Raw Normal View History

from fittrackee.utils import clean
def clean_tokens(days: int) -> int:
sql = """
DELETE FROM oauth2_token
2023-10-04 15:25:26 +02:00
WHERE oauth2_token.issued_at + oauth2_token.expires_in < %(limit)s;
"""
return clean(sql, days)