master
Aevann1 2022-01-11 05:41:33 +02:00
parent a53d7f31b4
commit 29f70d98c4
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:

View File

@ -38,7 +38,7 @@
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon {% if v and v.notifications_count %}position-relative{% endif %}"><i class="fal fa-bars text-gray-500 black"></i>
{% if v and v.notifications_count %}
<span class="notif-count">{{v.notifications_count}}</span>
<span class="notif-count" {% if not v.not_post_notifications_count %}style="background:blue"{% endif %}>{{v.notifications_count}}</span>
{% endif %}
</span>
</button>
@ -60,7 +60,7 @@
{% if v.notifications_count %}
<li class="nav-item d-flex align-items-center text-center justify-content-center mx-1">
<a class="nav-link position-relative" href="/notifications{% if v.notifications_count and v.notifications_count == v.post_notifications_count %}?posts=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Notifications"><i class="fas fa-bell text-danger"></i><span class="notif-count ml-1" style="padding-left: 4.5px;">{{v.notifications_count}}</span></a>
<a class="nav-link position-relative" href="/notifications{% if v.notifications_count and v.notifications_count == v.post_notifications_count %}?posts=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Notifications"><i class="fas fa-bell text-danger" {% if not v.not_post_notifications_count %}style="color:blue!important"{% endif %}></i><span class="notif-count ml-1" style="padding-left: 4.5px;{% if not v.not_post_notifications_count %}background:blue{% endif %}">{{v.notifications_count}}</span></a>
</li>
{% else %}