Changeset View
Changeset View
Standalone View
Standalone View
swh/counters/interface.py
| Show All 24 Lines | class CountersInterface: | |||||||||
| @remote_api_endpoint("count") | @remote_api_endpoint("count") | |||||||||
| def get_count(self, collection: str) -> int: | def get_count(self, collection: str) -> int: | |||||||||
| """Return the number of keys for the provided collection""" | """Return the number of keys for the provided collection""" | |||||||||
| ... | ... | |||||||||
| @remote_api_endpoint("counters") | @remote_api_endpoint("counters") | |||||||||
| def get_counters(self) -> Iterable[str]: | def get_counters(self) -> Iterable[str]: | |||||||||
| """Return the list of managed counters""" | """Return the list of managed counters""" | |||||||||
| ... | ||||||||||
| class HistoryInterface: | ||||||||||
| @remote_api_endpoint("/history") | ||||||||||
| def get_history(self, cache_file: str): | ||||||||||
| """Return the content of an history file previously created | ||||||||||
| by the refresh_counters_history method""" | ||||||||||
ardumontUnsubmitted Done Inline Actions
ardumont: | ||||||||||
| @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""" | ||||||||||
| ... | ||||||||||