This commit is contained in:
Aevann1 2022-01-11 05:41:33 +02:00
parent ce35715f6d
commit edb554b08e
2 changed files with 5 additions and 5 deletions

View file

@ -556,14 +556,14 @@ def thumbnail_thread(pid):
db = db_session()
print(cpu_percent(), flush=True)
cpu = cpu_percent()
time.sleep(0.1)
cpu = cpu_percent()
if cpu > 5:
print('wtf', flush=True)
if cpu > 70:
print(f'Cpu usage at {cpu}%, Enabling under attack mode!', flush=True)
with open('under_attack', 'r') as f: content = f.read()
with open('under_attack', 'w') as f: