Skip to content

Commit 11e153a

Browse files
author
woytu
committed
fixed 改变清除内存策略
1 parent d21124f commit 11e153a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/SystemUtil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ def restart_process(path):
141141
:return:
142142
"""
143143
if psutil.virtual_memory().percent >= 80:
144+
print("当前进程id:", os.getpid())
145+
print("前进程组id:", os.getpid())
146+
print("父进程id:", os.getppid())
144147
print('内存使用:', psutil.Process(os.getpid()).memory_info().rss)
145148
print("当前内存占用率:", psutil.virtual_memory().percent)
146149
# if gc.isenabled():
147150
# # 释放内存
148151
# gc.collect()
149-
print("当前进程id:", os.getpid())
150-
print("前进程组id:", os.getpid())
151-
print("父进程id:", os.getppid())
152152

153153
py = "python3" if (os.system("python3 -V") == 0) else "python"
154154
sysstr = platform.system()

0 commit comments

Comments
 (0)