mirror of
https://github.com/snowykami/server-status-client.git
synced 2025-08-02 19:59:53 +00:00
✨ 修复运行时间错误的问题
This commit is contained in:
@ -6,6 +6,8 @@ from typing import Any
|
||||
import psutil
|
||||
import requests
|
||||
|
||||
from server_status.timezone import get_timezone
|
||||
|
||||
excluded_partition_prefix = ("/var", "/boot", "/run", "/proc", "/sys", "/dev", "/tmp", "/snap")
|
||||
|
||||
|
||||
@ -39,6 +41,8 @@ class Hardware:
|
||||
|
||||
disks: dict[str, dict[str, int]] = {}
|
||||
|
||||
timezone: str = get_timezone()
|
||||
|
||||
net_up: int = 0
|
||||
net_down: int = 0
|
||||
net_type: str = "ethernet"
|
||||
@ -190,6 +194,7 @@ class Client:
|
||||
"start_time": int(self.start_time), # 系统启动的时间
|
||||
"link": self.link,
|
||||
"observed_at": int(time.time()),
|
||||
"timezone": self.hardware.timezone,
|
||||
},
|
||||
"hardware": {
|
||||
"mem": {
|
||||
|
Reference in New Issue
Block a user