397b999558
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
368 B
Python
11 lines
368 B
Python
from app.tasks.celery_app import celery_app
|
|
from app.tasks.transcription import SyncSession
|
|
from app.services.storage import cleanup_old_data
|
|
|
|
|
|
@celery_app.task(name="app.tasks.cleanup.cleanup_old_data")
|
|
def cleanup_old_data_task(retention_days: int | None = None):
|
|
with SyncSession() as db:
|
|
result = cleanup_old_data(db, retention_days)
|
|
return result
|