mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
feat: update document tracking to use 'updated_at' timestamp instead of 'last_edited_at'
This commit is contained in:
parent
a313387e0f
commit
8c9aa68faa
28 changed files with 253 additions and 18 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue