feat: remove telemetry

This commit is contained in:
Junyan Qin
2025-05-10 16:17:01 +08:00
parent d1f7b93d77
commit 425681ea09
18 changed files with 17 additions and 525 deletions

View File

@@ -108,10 +108,7 @@ class AnnouncementManager:
for ann in announcements:
ann_text += f'[公告] {ann.time}: {ann.content}\n'
if announcements:
await self.ap.ctr_mgr.main.post_announcement_showed(
ids=[item.id for item in announcements]
)
# TODO statistics
return ann_text, logging.INFO
except Exception as e:

View File

@@ -3,7 +3,6 @@ from __future__ import annotations
import os
import typing
import logging
import time
import requests
@@ -41,10 +40,8 @@ class VersionManager:
async def update_all(self):
"""检查更新并下载源码"""
start_time = time.time()
current_tag = self.get_current_version()
old_tag = current_tag
rls_list = await self.get_release_list()
@@ -141,12 +138,7 @@ class VersionManager:
with open('current_tag', 'w') as f:
f.write(current_tag)
await self.ap.ctr_mgr.main.post_update_record(
spent_seconds=int(time.time() - start_time),
infer_reason='update',
old_version=old_tag,
new_version=current_tag,
)
# TODO statistics
async def is_new_version_available(self) -> bool:
"""检查是否有新版本"""