fix: simplify embedding rate-limit re-enqueue and clean up tests#615
Conversation
Move 429 re-enqueue logic directly into the exception handler instead of deferring via a flag, making the flow clearer and avoiding unnecessary DB writes on rate-limit errors. Add has_queue_manager/enqueue_embedding_msg to base backend class. Remove obsolete account_id param from test and prune outdated URI deduplicator test cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
Simplify the 429 rate-limit error handling in
TextEmbeddingHandlerby moving re-enqueue logic directly into the exception handler, and clean up related tests.Related Issue
N/A
Type of Change
Changes Made
is_429_errorat module top level instead of inlinehas_queue_managerproperty andenqueue_embedding_msgmethod toVikingVectorIndexBackendbase classaccount_idparameter fromget_context_by_uricalls in session commit testsTestFindSimilarMemoriesURIConversiontest class from deduplicator URI testsTesting
Checklist
Screenshots (if applicable)
N/A
Additional Notes