refactor: rename upload_to_s3 to process_document

- Rename upload_to_s3.py to process_document.py to better reflect its purpose
- Update all import statements across the codebase to use new module name
- Remove S3-specific code and references
- Keep the core document processing logic intact
- Update docstrings and comments to reflect new functionality

This change is part of removing AWS S3 dependencies and simplifying the
document processing pipeline.
This commit is contained in:
Christian Krakau-Louis
2025-03-27 14:50:51 +01:00
parent e1caa144f2
commit de06fd1286
7 changed files with 42 additions and 52 deletions
+5 -4
View File
@@ -41,8 +41,9 @@ class FileRecord(Base):
class ProcessingLog(Base):
__tablename__ = "processing_logs"
id = Column(Integer, primary_key=True, index=True)
file_id = Column(Integer, ForeignKey("files.id"))
step_name = Column(String) # e.g. "OCR", "convert_to_pdf", "upload_s3"
status = Column(String) # "success" / "failure"
message = Column(String) # error text or success note
file_id = Column(Integer, ForeignKey("files.id"), nullable=True) # Optional file association
task_id = Column(String, index=True) # Celery task ID
step_name = Column(String) # e.g., "OCR", "convert_to_pdf", "upload_s3"
status = Column(String) # "pending", "in_progress", "success", "failure"
message = Column(String, nullable=True) # Error text or success note
timestamp = Column(DateTime(timezone=True), server_default=func.now())