Files
gh-christianlouis-docuelevate/app/tasks/finalize_document_storage.py
T
Christian Krakau-Louis 1ad9425102 Added first working version of the code. Processes
PDF files, no upload yet.
2025-02-11 19:42:23 +01:00

15 lines
491 B
Python

#!/usr/bin/env python3
from app.config import settings
from app.tasks.retry_config import BaseTaskWithRetry
# Import the shared Celery instance
from app.celery_app import celery
@celery.task(base=BaseTaskWithRetry)
def finalize_document_storage(original_file: str, processed_file: str, metadata: dict):
"""Final storage step after embedding metadata."""
print(f"[INFO] Finalizing document storage for {processed_file}")
return {"status": "Completed", "file": processed_file}