feat: update document tracking to use 'updated_at' timestamp instead of 'last_edited_at'

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-12 01:32:14 -08:00
parent a313387e0f
commit 8c9aa68faa
28 changed files with 253 additions and 18 deletions

View file

@ -2,6 +2,8 @@
Base functionality and shared imports for document processors.
"""
from datetime import UTC, datetime
from langchain_community.document_transformers import MarkdownifyTransformer
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.future import select
@ -12,6 +14,16 @@ from app.db import Document
md = MarkdownifyTransformer()
def get_current_timestamp() -> datetime:
"""
Get the current timestamp with timezone for updated_at field.
Returns:
Current datetime with UTC timezone
"""
return datetime.now(UTC)
async def check_duplicate_document(
session: AsyncSession, content_hash: str
) -> Document | None: