mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-10 20:35:17 +02:00
fix(clickup): commit failed status immediately
This commit is contained in:
parent
f5dd8f3985
commit
45438249b6
1 changed files with 5 additions and 0 deletions
|
|
@ -437,10 +437,15 @@ async def index_clickup_tasks(
|
|||
try:
|
||||
document.status = DocumentStatus.failed(str(e))
|
||||
document.updated_at = get_current_timestamp()
|
||||
# Commit now so the failed status survives a later rollback or
|
||||
# crash; otherwise the doc stays stuck in pending/processing.
|
||||
await session.commit()
|
||||
except Exception as status_error:
|
||||
logger.error(
|
||||
f"Failed to update document status to failed: {status_error}"
|
||||
)
|
||||
with contextlib.suppress(Exception):
|
||||
await session.rollback()
|
||||
documents_failed += 1
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue