Fetch multiple source documents sequentially to prevent bot detection#1176
Merged
Fetch multiple source documents sequentially to prevent bot detection#1176
Conversation
To prevent being detected as a bot
MattiSG
approved these changes
Jul 18, 2025
Member
MattiSG
left a comment
There was a problem hiding this comment.
Yes, I agree, that's also what came to my mind: in large combines, there are just too many requests to do them concurrently.
I believe we could optimize this much further by:
- Doing domain grouping (this only works for combines, if we track many terms for the same service won't we have the same issue across terms?)
- Using a map-reduce rather than a for-await
- Control the number of concurrent calls to an arbitrary amount (3? 5?) rather than going down to 1
But that will already likely be a great improvement as is, thanks!
CHANGELOG.md
Outdated
|
|
||
| ## Unreleased [minor] | ||
|
|
||
| > Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs. |
Member
There was a problem hiding this comment.
Shouldn't that be accounted towards ZEMKI?
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.
Tested with the Platform Governance Archive collection and it should fix OpenTermsArchive/pga-declarations#296, OpenTermsArchive/pga-declarations#260 and OpenTermsArchive/pga-declarations#205