优化数据保存功能,添加时间戳并移除定时任务;新增获取general信息的功能
This commit is contained in:
8
main.py
8
main.py
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user