Closed preritdas closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request focus on enhancing the FilloutDNSValidator
class in real_intent/validate/dns.py
. A new instance variable self.submissions
is introduced to cache submissions from the Fillout API, initialized during the class constructor. A new method, _update_submissions_cache
, is added to refresh this cache. The all_emails
method is modified to utilize the cached submissions, falling back to the API call only if the cache is empty. The _get_submissions
method remains unchanged, and error handling in _email_from_submission
is preserved.
File | Change Summary |
---|---|
real_intent/validate/dns.py | - Added variable self.submissions: list[dict] in FilloutDNSValidator . |
- Added method def _update_submissions_cache(self) -> None in FilloutDNSValidator . |
|
- Modified all_emails method to use self.submissions cache. |
In the burrow where data flows,
A cache of submissions now brightly glows.
With fewer calls to the API's door,
Our rabbit heart leaps, we fetch even more!
Hopping through code with a joyful cheer,
Efficiency blooms, the path is clear! 🐇✨
@coderabbitai review
Saw 429 client errors caused by the DNS validation process. Maintain an internal, instance-specific cache of submissions updated on initialization.
No changes to functionality/implementations for dependent code. Does add a new
._update_submissions_cache()
method.Summary by CodeRabbit