Revert "fix: duplicate document ingest guard" (#15707)

Reverts infiniflow/ragflow#15638
This commit is contained in:
Wang Qi
2026-06-05 17:45:29 +08:00
committed by GitHub
parent 214ee319f8
commit aa9545e4c9
2 changed files with 3 additions and 36 deletions

View File

@@ -276,26 +276,6 @@ class CommonService:
num = cls.model.update(data).where(cls.model.id == pid).execute()
return num
@classmethod
@DB.connection_context()
@retry_db_operation
def update_by_id_if_update_time(cls, pid, update_time, data):
# Update a single record by ID only if update_time matches the expected value.
# Args:
# pid: Record ID
# update_time: Expected update_time value for optimistic locking
# data: Updated field values
# Returns:
# Number of records updated
data["update_time"] = current_timestamp()
data["update_date"] = datetime_format(datetime.now())
num = (
cls.model.update(data)
.where(cls.model.id == pid, cls.model.update_time == update_time)
.execute()
)
return num
@classmethod
@DB.connection_context()
def get_by_id(cls, pid):