Repository navigation
Release a lead reservation that never got past being taken - #197
Merged
Merged
Conversation
A failure between taking the daily slot and planting a target left a pending crawl_lead row holding one of the thirty slots for the day. Remove it, but only while no target exists: once AddAsync has planted one, the row is the evidence for it and stays, pending, so a retry answers already_queued. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012dFvvxSB84LHDrV6PxiMFP
|
Warning Review paused — included plan limit reachedKeep your review moving with free on-demand reviews.
On-demand reviews are free for the next 4 days.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Promotion and pricing detailsOn-demand reviews are free for the next 4 days. After that, they cost $0.25 per reviewed file. Review limit detailsOr wait 48 minutes for your next included review. Limit details: You’ve used the included review currently available. Your 69 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: if
crawl_lead_addfailed after taking its daily slot but before planting a target, thecrawl_leadrow stayedpendingand held one of the day's thirty slots.After: that row is removed, but only while no target exists. Once
targets.AddAsynchas planted one, the row is the evidence for that target and stayspending; a retry answersalready_queued.crawl_leadsnow says so.How:
ILeadLog.AbandonAsyncdeletes a row only when it is stillpendingwith nocrawl_target_id.LeadService.SubmitAsynccalls it from a catch guarded on!dryRun && planted is null, swallowing any error from the cleanup so the original exception surfaces. Covered by twoLeadServiceTestscases and one Postgres test.Follow-up to CodeRabbit's review on #196.
🤖 Generated with Claude Code
https://claude.ai/code/session_012dFvvxSB84LHDrV6PxiMFP
Generated by Claude Code