If sync.upsert() or sync.delete() raises after a job is already marked succeeded (e.g. disk full, DB locked), the unhandled exception crashes the worker. The job stays succeeded but sync_state is stale, and the crashed worker stops processing other jobs. Wrap the post-success sync_state writes in a try/except. On failure, log the error and continue. The worst case is a redundant re-ingest on the next sweep — better than killing the worker. |
||
|---|---|---|
| .. | ||
| rag | ||