Repository navigation
Fall back across job sources when one can't answer - #27
Closed
rahulrathore95 wants to merge 1 commit into
Closed
rahulrathore95 wants to merge 1 commit into
rahulrathore95 wants to merge 1 commit into
Conversation
searchWithFallback() in find.ts tries the source chosen in Settings first, then every other source with a key saved (each keeps its own key, independently of which is "chosen"), in case the first is out of quota, down, or doesn't cover the query's country - instead of the whole search just failing. A source with no key configured is skipped silently rather than counted as a failed attempt, so with only one source set up (the common case) the error message is unchanged from before this existed. A kept search's "Show more" always stays pinned to the exact source it started with, since its pagination cursor only means something there. Shared by askSource (Find jobs, search_jobs) and the job agent's search step, which additionally excludes the Bundesagentur für Arbeit from its own fallback chain (it never searches that source unattended, #223). Verified: yarn typecheck, yarn lint and yarn test (full suite) all pass, 1685 tests, 0 failures. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Author
|
Closing this — I'm going to keep this work on my own fork instead of submitting it back upstream. Thanks for the earlier feedback on splitting it up. |
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
Split out of #22 per your request. One change:
searchWithFallback()infind.tstries the source chosen in Settings first, then every other source with a key saved (each keeps its own key, independently of which is "chosen"), in case the first is out of quota, down, or doesn't cover the query's country — instead of the whole search just failing.A source with no key configured is skipped silently rather than counted as a failed attempt, so with only one source set up (the common case) the error message is unchanged from before this existed. A kept search's "Show more" always stays pinned to the exact source it started with, since its pagination cursor only means something there.
Shared by
askSource(Find jobs,search_jobs) and the job agent's search step, which additionally excludes the Bundesagentur für Arbeit from its own fallback chain (it never searches that source unattended, #223).Test plan
yarn typecheck,yarn lint,yarn test(full suite): 1685 passed, 0 failures.posting-searches.db.test.ts: falls back to the next configured source on quota, names every source when all fail, unchanged behavior with a single source configured, and "Show more" staying pinned to its original source.🤖 Generated with Claude Code