Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163511
D8605.id31084.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
927 B
Subscribers
None
D8605.id31084.diff
View Options
diff --git a/swh/lister/nixguix/lister.py b/swh/lister/nixguix/lister.py
--- a/swh/lister/nixguix/lister.py
+++ b/swh/lister/nixguix/lister.py
@@ -28,6 +28,7 @@
from swh.core.github.utils import GitHubSession
from swh.core.tarball import MIMETYPE_TO_ARCHIVE_FORMAT
+from swh.core.utils import grouper
from swh.lister import TARBALL_EXTENSIONS
from swh.lister.pattern import CredentialsType, StatelessLister
from swh.scheduler.model import ListedOrigin
@@ -367,4 +368,7 @@
"""Given an artifact tuple (type, artifact), yield a ListedOrigin."""
artifact_type, artifact = artifact_tuple
mapping_type_fn = getattr(self, f"{artifact_type.value}_to_listed_origin")
- yield from mapping_type_fn(artifact)
+
+ # randomize a bit origins to not hit one server at the same time
+ for batch_origins in grouper(mapping_type_fn(artifact), n=5000):
+ yield from batch_origins
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 9:43 AM (19 h, 11 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219559
Attached To
D8605: nixguix: Randomize order of listed origins
Event Timeline
Log In to Comment