Replace boolean latch with time-based retry for HTTP embedding endpoint (#766) #802

Open
sleepy wants to merge 0 commits from fix/embedding-retry-766 into main
Owner

Replaces _http_embed_down boolean latch with time-based retry (30s interval). Mirrors rag_singleton.py pattern. Closes #766

Replaces _http_embed_down boolean latch with time-based retry (30s interval). Mirrors rag_singleton.py pattern. Closes #766
The _http_embed_down boolean latched to True forever on first failure,
preventing the HTTP embedding endpoint from ever being retried during
the process lifetime. Replace with a time-based retry using
_http_embed_last_fail (monotonic timestamp) and _RETRY_INTERVAL (30s),
matching the pattern already used in rag_singleton.py.

After a failure, the next probe attempt is suppressed for 30 seconds,
then the endpoint is retried automatically. reset_http_embed_state()
still provides immediate re-probing when the user saves new endpoint
settings from the admin panel.

Closes #766
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/embedding-retry-766:fix/embedding-retry-766
git switch fix/embedding-retry-766

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/embedding-retry-766
git switch fix/embedding-retry-766
git rebase main
git switch main
git merge --ff-only fix/embedding-retry-766
git switch fix/embedding-retry-766
git rebase main
git switch main
git merge --no-ff fix/embedding-retry-766
git switch main
git merge --squash fix/embedding-retry-766
git switch main
git merge --ff-only fix/embedding-retry-766
git switch main
git merge fix/embedding-retry-766
git push origin main
Sign in to join this conversation.
No description provided.