Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ async def report_progress(message: str, percentage: int, batch_info: dict = None
cancellation_check()

try:
client.table("archon_crawled_pages").insert(batch_data).execute()
client.table("archon_crawled_pages").upsert(batch_data, on_conflict="url,chunk_number").execute()

Comment thread
coderabbitai[bot] marked this conversation as resolved.
# Increment completed batches and report simple progress
completed_batches += 1
Expand Down Expand Up @@ -346,7 +346,7 @@ async def report_progress(message: str, percentage: int, batch_info: dict = None
cancellation_check()

try:
client.table("archon_crawled_pages").insert(record).execute()
client.table("archon_crawled_pages").upsert([record], on_conflict="url,chunk_number").execute()
successful_inserts += 1
except Exception as individual_error:
search_logger.error(
Expand Down