This repository was archived by the owner on May 21, 2026. It is now read-only.
Update requeueing condition to avoid no method error#415
Merged
vasconsaurus merged 1 commit intoOct 24, 2025
Conversation
ClaimReviewParser.parsers already returns only enabled parsers:
def self.parsers
QuietHashie[
Hash[ClaimReviewParser.enabled_subclasses.map do |sc|
[sc.service, sc]
end]
]
end
ClaimReviewParser.parsers
=> #<QuietHashie reuters_brazil=ReutersBrazil reuters_spanish=ReutersSpanish>
irb(main):003:0> ClaimReviewParser.parsers['aos_fatos']
=> nil
This causes
"\"error_message\":\"undefined method `deprecated' for nil:NilClass\",
\"error_class\":\"NoMethodError\",\"failed_at\":1761238248.0907707,
\"retry_count\":6,\"retried_at\":1761239681.7711115}"}"
Contributor
Author
|
@caiosba I think this might actually solve our issues, as it should stop re-queueing deprecated classes. But, should we add something to more explicitly kill jobs instead of just not re-queueing, or should this be enough? |
caiosba
approved these changes
Oct 24, 2025
caiosba
left a comment
Contributor
There was a problem hiding this comment.
@vasconsaurus let's try to see if it clears the queue naturally, if it doesn't, we can manually clear them.
vasconsaurus
added a commit
that referenced
this pull request
Oct 24, 2025
ClaimReviewParser.parsers already returns only enabled parsers. So when we try `!ClaimReviewParser.parsers[service].deprecated` with a deprecated service, it returns nil. Which causes: "\"error_message\":\"undefined method `deprecated' for nil:NilClass\", \"error_class\":\"NoMethodError\",\"failed_at\":1761238248.0907707, \"retry_count\":6,\"retried_at\":1761239681.7711115}"}"
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
ClaimReviewParser.parsersalready returns only enabled parsers:So when we try the following with a deprecated service, it returns nil.
Which causes:
Reference: CV2-6609