Page MenuHomeSoftware Heritage

D5908.id21205.diff
No OneTemporary

D5908.id21205.diff

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

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

Event Timeline