|
|
@@ -443,7 +443,7 @@ class AutoReplyCardsMonitor(AutoReplyCardsMonitorConst):
|
|
|
gh_id, self.INIT_STATUS, self.PROCESSING_STATUS
|
|
|
)
|
|
|
|
|
|
- case 25013:
|
|
|
+ case self.BLOGGER_ACCOUNT_BANNED_CODE:
|
|
|
await self.mapper.set_account_as_invalid(gh_id)
|
|
|
|
|
|
case _:
|
|
|
@@ -599,7 +599,7 @@ class AutoReplyCardsMonitor(AutoReplyCardsMonitorConst):
|
|
|
blogger_response = await get_article_list_from_account(
|
|
|
gh_id, is_cache=False
|
|
|
)
|
|
|
- if not blogger_response:
|
|
|
+ if blogger_response is None:
|
|
|
await self.log_service.log(
|
|
|
contents={
|
|
|
"task": "auto_reply_cards_monitor",
|
|
|
@@ -613,7 +613,7 @@ class AutoReplyCardsMonitor(AutoReplyCardsMonitorConst):
|
|
|
blogger_code = blogger_response.get("code")
|
|
|
if blogger_code != 0:
|
|
|
blogger_msg = blogger_response.get("msg", "")
|
|
|
- if blogger_code == 25013:
|
|
|
+ if blogger_code == self.BLOGGER_ACCOUNT_BANNED_CODE:
|
|
|
alert_title = f"自动回复卡片-账号违规: {account_name}"
|
|
|
else:
|
|
|
alert_title = f"自动回复卡片-账号异常(可能已迁移): {account_name}"
|
|
|
@@ -631,8 +631,15 @@ class AutoReplyCardsMonitor(AutoReplyCardsMonitorConst):
|
|
|
mention=True,
|
|
|
env="long_articles_task",
|
|
|
)
|
|
|
- except Exception:
|
|
|
- pass
|
|
|
+ except Exception as e:
|
|
|
+ await self.log_service.log(
|
|
|
+ contents={
|
|
|
+ "task": "auto_reply_cards_monitor",
|
|
|
+ "function": "follow_gzh_task",
|
|
|
+ "status": "fail",
|
|
|
+ "message": f"飞书告警发送失败: {account_name}, gh_id={gh_id}, error={e}",
|
|
|
+ }
|
|
|
+ )
|
|
|
|
|
|
await self.log_service.log(
|
|
|
contents={
|