优化数据保存功能,添加时间戳并移除定时任务;新增获取general信息的功能

This commit is contained in:
2025-07-28 21:10:56 +08:00
parent 3d9dc5d7fc
commit 3dee6a37eb
2 changed files with 13 additions and 14 deletions

View File

@@ -162,6 +162,13 @@ def git_commit_and_push():
except subprocess.CalledProcessError as e:
LOGGER.error("Git操作失败: %s", e)
def general_info():
"""获取general信息"""
LOGGER.info("获取general信息")
try:
subprocess.run(["python", "general.py"], check=True)
except subprocess.CalledProcessError as e:
LOGGER.error("获取general信息失败: %s", e)
def load_processed_hashes():
"""Load processed transaction hashes from file."""
@@ -219,6 +226,7 @@ def main():
current_time = time.time()
if current_time - last_git_time >= GIT_INTERVAL:
general_info()
git_commit_and_push()
last_git_time = current_time