|
@@ -55,7 +55,7 @@ class OutsideGzhArticlesManager(MonitorConst):
|
|
|
order by publish_timestamp desc
|
|
|
limit %s;
|
|
|
"""
|
|
|
- response = await self.pool.async_fetch(query=query, params=(gh_id, 1))
|
|
|
+ response, error = await self.pool.async_fetch(query=query, params=(gh_id, 1))
|
|
|
if response:
|
|
|
publish_timestamp = response[0]["publish_timestamp"]
|
|
|
if publish_timestamp is None:
|
|
@@ -81,7 +81,8 @@ class OutsideGzhArticlesCollector(OutsideGzhArticlesManager):
|
|
|
where
|
|
|
t1.mode_type = '代运营服务号';
|
|
|
"""
|
|
|
- return await self.pool.async_fetch(query=query, db_name="aigc_db_pool")
|
|
|
+ response, error = await self.pool.async_fetch(query=query, db_name="aigc_db_pool")
|
|
|
+ return response
|
|
|
|
|
|
async def fetch_each_account(self, account: dict):
|
|
|
gh_id = account["gh_id"]
|
|
@@ -121,7 +122,7 @@ class OutsideGzhArticlesCollector(OutsideGzhArticlesManager):
|
|
|
if response_code == self.ARTICLE_ILLEGAL_CODE:
|
|
|
illegal_reason = article_detail.get("msg")
|
|
|
# bot and return
|
|
|
- feishu_robot.bot(
|
|
|
+ await feishu_robot.bot(
|
|
|
title="文章违规告警",
|
|
|
detail={
|
|
|
"账号名称": article["account_name"],
|
|
@@ -181,7 +182,8 @@ class OutsideGzhArticlesMonitor(OutsideGzhArticlesManager):
|
|
|
from outside_gzh_account_monitor
|
|
|
where illegal_status = {self.INIT_STATUS} and publish_timestamp > {publish_timestamp_threshold};
|
|
|
"""
|
|
|
- return await self.pool.async_fetch(query=fetch_query)
|
|
|
+ response, error = await self.pool.async_fetch(query=fetch_query)
|
|
|
+ return response
|
|
|
|
|
|
async def check_each_article(self, article: dict):
|
|
|
"""
|