修复CPU物理核心计算错误

This commit is contained in:
远野千束 2024-10-03 17:03:15 +08:00
parent 0360e58cc1
commit 2e4fd493c5
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -122,6 +122,8 @@ celerybeat.pid
*.sage.py
pdm.lock
start.cmd
start.sh
# Environments
.env

View File

@ -224,7 +224,7 @@ class Client:
self.hardware.mem_used = psutil.virtual_memory().used
self.hardware.swap_total = psutil.swap_memory().total
self.hardware.swap_used = psutil.swap_memory().used
self.hardware.cpu_cores = psutil.cpu_count()
self.hardware.cpu_cores = psutil.cpu_count(logical=False)
self.hardware.cpu_logics = psutil.cpu_count(logical=True)
for part in psutil.disk_partitions():
try: