feat: main.announcement 接口

This commit is contained in:
RockChinQ
2023-12-21 17:11:45 +08:00
parent b69f193a3e
commit e02765bf95
2 changed files with 43 additions and 14 deletions
+6
View File
@@ -398,6 +398,12 @@ async def start_process(first_time_init=False):
if len(new_announcement) > 0:
for announcement in new_announcement:
logging.critical("[公告]<{}> {}".format(announcement['time'], announcement['content']))
# 发送统计数据
pkg.utils.context.get_center_v2_api().main.post_announcement_showed(
[announcement['id'] for announcement in new_announcement]
)
except Exception as e:
logging.warning("获取公告失败:{}".format(e))