7e65eb8334
(and to SQLAlchemy 2.x)
10 lines
229 B
Python
10 lines
229 B
Python
from fittrackee.utils import clean
|
|
|
|
|
|
def clean_tokens(days: int) -> int:
|
|
sql = """
|
|
DELETE FROM oauth2_token
|
|
WHERE oauth2_token.issued_at + oauth2_token.expires_in < :limit;
|
|
"""
|
|
return clean(sql, days)
|