open-notebook/api
Rafael Pellegrini e2bb10a693
fix(sources): reject retry while a source is already processing (#1646)
* fix(sources): reject retry while a source is already processing

retry_source_processing raised HTTPException(400) for a "running" or
"queued" status inside a try block whose `except Exception` is meant
only for a failed get_status() lookup. The 400 was caught by it, logged
as a warning and the retry was queued anyway, so two quick retry
requests started two concurrent process_source jobs for the same source.

Do the status lookup inside the try and raise the 400 outside it, so
only a genuine failure to read the status falls through to the retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): scope the retry fix entry and add the PR number

Two retries sent at the very same moment can still both pass the
check-then-act guard; the entry no longer claims otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Luis Novo <lfnovo@gmail.com>
2026-11-29 14:46:37 +00:00
..
routers fix(sources): reject retry while a source is already processing (#1646) 2026-11-29 14:46:37 +00:00
__init__.py
AGENTS.md
auth.py
CLAUDE.md
command_service.py
cors.py
credentials_service.py Merge PR #1540 onto current main 2026-11-14 12:24:41 +00:00
main.py Merge PR #1540 onto current main 2026-11-14 12:24:41 +00:00
middleware.py
models.py feat(settings): configure the Docling vision endpoint in Settings (#1562) 2026-11-14 12:37:33 -03:00
podcast_service.py fix(podcasts): fall back to the default TTS model (#1492) 2026-11-14 12:18:22 -03:00