Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346287
D5908.id21205.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5908.id21205.diff
View Options
diff --git a/swh/counters/journal_client.py b/swh/counters/journal_client.py
--- a/swh/counters/journal_client.py
+++ b/swh/counters/journal_client.py
@@ -7,11 +7,11 @@
import msgpack
-from swh.counters.redis import Redis
+from swh.counters.interface import CountersInterface
def process_journal_messages(
- messages: Dict[str, Dict[bytes, bytes]], *, counters: Redis
+ messages: Dict[str, Dict[bytes, bytes]], *, counters: CountersInterface
) -> None:
"""Count the number of different values of an object's property.
It allow for example to count the persons inside the
@@ -27,7 +27,7 @@
process_releases(messages["release"], counters)
-def process_revisions(revisions: Dict[bytes, bytes], counters: Redis):
+def process_revisions(revisions: Dict[bytes, bytes], counters: CountersInterface):
"""Count the number of different authors and committers on the
revisions (in the person collection)"""
persons = set()
@@ -39,7 +39,7 @@
counters.add("person", list(persons))
-def process_releases(releases: Dict[bytes, bytes], counters: Redis):
+def process_releases(releases: Dict[bytes, bytes], counters: CountersInterface):
"""Count the number of different authors on the
releases (in the person collection)"""
persons = set()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:52 PM (2 w, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224798
Attached To
D5908: journal_client: Use CountersInterface for counters typing
Event Timeline
Log In to Comment