feat: storage management — disk usage, cleanup API, scheduled cleanup task

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 22:32:36 +05:00
parent b1eafa4e0b
commit 397b999558
4 changed files with 117 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
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