Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9337500
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
View Options
diff --git a/swh/counters/interface.py b/swh/counters/interface.py
index 976e72d..ad36d81 100644
--- a/swh/counters/interface.py
+++ b/swh/counters/interface.py
@@ -1,47 +1,47 @@
# Copyright (C) 2021 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from typing import Any, Iterable
from swh.core.api import remote_api_endpoint
class CountersInterface:
@remote_api_endpoint("check")
def check(self):
"""Dedicated method to execute some specific check per implementation.
"""
...
@remote_api_endpoint("add")
def add(self, collection: str, keys: Iterable[Any]) -> None:
"""Add the provided keys to the collection
Only count new keys.
"""
...
@remote_api_endpoint("count")
def get_count(self, collection: str) -> int:
"""Return the number of keys for the provided collection"""
...
@remote_api_endpoint("counters")
def get_counters(self) -> Iterable[str]:
"""Return the list of managed counters"""
...
class HistoryInterface:
- @remote_api_endpoint("/history")
+ @remote_api_endpoint("history")
def get_history(self, cache_file: str):
"""Return the content of an history file previously created
by the refresh_counters method"""
- @remote_api_endpoint("/refresh_history")
+ @remote_api_endpoint("refresh_history")
def refresh_history(self, cache_file: str):
"""Refresh the cache file containing the counters historical data.
It can be an aggregate of live data and static data stored on
a separate file"""
...
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jul 4 2025, 8:07 AM (10 w, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3293998
Attached To
rDCNT Archive counters
Event Timeline
Log In to Comment