|
|
@@ -9,6 +9,13 @@ class RankLogMonitorMapper:
|
|
|
self.pool = pool
|
|
|
self.log_service = log_service
|
|
|
|
|
|
+ async def fetch_accounts(self) -> list[str]:
|
|
|
+ query = """
|
|
|
+ SELECT DISTINCT gh_id FROM rank_content_score;
|
|
|
+ """
|
|
|
+ response = await self.pool.async_fetch(query=query)
|
|
|
+ return [i.get("gh_id") for i in (response or [])]
|
|
|
+
|
|
|
async def fetch_all_articles(self) -> list[dict]:
|
|
|
query = """
|
|
|
SELECT gh_id, account_name, source_id, content_pool_type, strategy,
|