mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 00:06:04 +00:00
feat: remove telemetry
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
"""检查是否有新版本"""
|
||||
|
||||
Reference in New Issue
Block a user