Repository navigation
fix(api): mark sitemap job done even if getCrawl throws - #4266
Open
edenbuilds wants to merge 1 commit into
Open
edenbuilds wants to merge 1 commit into
edenbuilds wants to merge 1 commit into
Conversation
Move getCrawl inside the try/finally in processKickoffSitemapJob so a Redis error cannot leave sitemap_jobs_done permanently short and hang the crawl. Fixes firecrawl#4245
This branch has not been deployed
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.
Summary
getCrawl()inside thetry/finallyinprocessKickoffSitemapJobso Redis/deserialization failures still recordsitemap_jobs_done.sitemap_jobsandsitemap_jobs_donepermanently disagree.Fixes #4245
Test plan
getCrawlis inside the sametrythat owns thesitemap_jobs_donefinallygetCrawlthrow and verify the job id is still sadd'd tositemap_jobs_doneMade with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Move
getCrawl()inside the try/finally inprocessKickoffSitemapJobso sitemap kickoff jobs are still marked done if Redis/deserialization fails, preventing stuck crawls. Fixes #4245.getCrawl(job.data.crawl_id)inside the same try that has thesitemap_jobs_donefinally.sitemap_jobs_done, keeping counters in sync and avoiding hangs.Written for commit c0cbeaf. Summary will update on new commits.