diff --git a/files/routes/posts.py b/files/routes/posts.py index 3456fee545..4938dfb802 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -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: diff --git a/files/templates/header.html b/files/templates/header.html index 1fd952e609..d71db984c6 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -38,7 +38,7 @@ aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@@ -60,7 +60,7 @@ {% if v.notifications_count %}