feat(records): async Hetzner object storage upload via Celery
Summary
- Moves file upload to Hetzner S3-compatible object storage into a background Celery task (
upload_record_to_storage) - Introduces
UploadJobmodel to track async upload state (status, progress, error, linked record) - Adds
GET /upload/{upload_id}/statusendpoint for clients to poll job progress - Adds
UPLOADS_ASYNC_ENABLEDfeature flag (default:true) to toggle sync/async behaviour - Adds Alembic migration
c1d2e3f4a5b6to create theuploadjobtable
Test plan
-
Upload audio file in chunks via POST /records/upload/chunk -
Finalize upload via POST /records/upload/finalize— confirm202 Acceptedwithupload_id -
Poll GET /upload/{upload_id}/status— confirm status progresses (queued→processing→completed/failed) -
Confirm record is created in DB with record_idpopulated in upload job on success -
Set UPLOADS_ASYNC_ENABLED=false— confirm upload runs synchronously (no Celery task) -
Run alembic upgrade head— confirmuploadjobtable created cleanly
Closes #63
Edited by Gunaputra Nagendra Pavan Yedida