An open source, non-profit web search engine
Fix stats types
Daoud Clarke2e8b0900b31c
diff --git a/mwmbl/crawler/app.py b/mwmbl/crawler/app.pyindex 9c48956..e058aef 100644--- a/mwmbl/crawler/app.py+++ b/mwmbl/crawler/app.py@@ -162,6 +162,7 @@ def create_router(batch_cache: BatchCache, queued_batches: RedisURLQueue, versio@router.get('/stats')def get_stats(request) -> MwmblStats:+ # TODO check that the types are right here, it's not validating!return stats_manager.get_stats()@router.get('/')diff --git a/mwmbl/crawler/stats.py b/mwmbl/crawler/stats.pyindex d02c943..6745c17 100644--- a/mwmbl/crawler/stats.py+++ b/mwmbl/crawler/stats.py@@ -45,8 +45,8 @@ class MwmblStats(BaseModel):urls_crawled_daily: dict[str, int]urls_crawled_hourly: list[int]users_crawled_daily: dict[str, int]- top_users: dict[str, int]- top_domains: dict[str, int]+ top_users: list[tuple[str, int]]+ top_domains: list[tuple[str, int]]urls_in_index_daily: dict[str, int]domains_in_index_daily: dict[str, int]results_in_index_daily: dict[str, int]