bbb
This commit is contained in:
parent
c1058df11b
commit
2bdc7e65eb
3 changed files with 6 additions and 5 deletions
|
@ -765,6 +765,7 @@ NOTIFIED_USERS = {
|
||||||
'joan': JOAN_ID,
|
'joan': JOAN_ID,
|
||||||
'pewkie': JOAN_ID,
|
'pewkie': JOAN_ID,
|
||||||
'carp': CARP_ID,
|
'carp': CARP_ID,
|
||||||
|
'carp': DONGER_ID,
|
||||||
'idio3': IDIO_ID,
|
'idio3': IDIO_ID,
|
||||||
'idio ': IDIO_ID,
|
'idio ': IDIO_ID,
|
||||||
'landlord_messiah': LLM_ID,
|
'landlord_messiah': LLM_ID,
|
||||||
|
|
|
@ -554,6 +554,8 @@ def archiveorg(url):
|
||||||
|
|
||||||
def thumbnail_thread(pid):
|
def thumbnail_thread(pid):
|
||||||
|
|
||||||
|
db = db_session()
|
||||||
|
|
||||||
print(cpu_percent(), flush=True)
|
print(cpu_percent(), flush=True)
|
||||||
|
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
@ -571,8 +573,8 @@ def thumbnail_thread(pid):
|
||||||
kind="enable_under_attack",
|
kind="enable_under_attack",
|
||||||
user_id=AUTOJANNY_ID,
|
user_id=AUTOJANNY_ID,
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
db.add(ma)
|
||||||
g.db.commit()
|
db.commit()
|
||||||
data='{"value":"under_attack"}'
|
data='{"value":"under_attack"}'
|
||||||
response = requests.patch(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, data=data)
|
response = requests.patch(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, data=data)
|
||||||
print(response.text, flush=True)
|
print(response.text, flush=True)
|
||||||
|
@ -591,8 +593,6 @@ def thumbnail_thread(pid):
|
||||||
else:
|
else:
|
||||||
return f"{post_url}{'/' if not post_url.endswith('/') else ''}{fragment_url}"
|
return f"{post_url}{'/' if not post_url.endswith('/') else ''}{fragment_url}"
|
||||||
|
|
||||||
db = db_session()
|
|
||||||
|
|
||||||
post = db.query(Submission).filter_by(id=pid).one_or_none()
|
post = db.query(Submission).filter_by(id=pid).one_or_none()
|
||||||
|
|
||||||
if not post or not post.url:
|
if not post or not post.url:
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if standalone and level==1 %}
|
{% if standalone and level==1 %}
|
||||||
<div class="post-info mt-3 mb-1 mr-2">
|
<div class="post-info mt-4 mb-1 mr-2">
|
||||||
{% if c.post and c.post.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
|
{% if c.post and c.post.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
|
||||||
<span class="align-top">
|
<span class="align-top">
|
||||||
{% if c.post %}
|
{% if c.post %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue