sneed
This commit is contained in:
parent
71542eec50
commit
24a69e3596
2 changed files with 3 additions and 28 deletions
|
@ -25,7 +25,7 @@ from .front import frontlist
|
||||||
from ruqqus.__main__ import app, cache
|
from ruqqus.__main__ import app, cache
|
||||||
import gevent
|
import gevent
|
||||||
|
|
||||||
def sex():
|
def sex(lex):
|
||||||
for u in g.db.query(User).filter(User.profileurl != None).all():
|
for u in g.db.query(User).filter(User.profileurl != None).all():
|
||||||
print(f"1 {u.profileurl}")
|
print(f"1 {u.profileurl}")
|
||||||
x = requests.get(u.profileurl)
|
x = requests.get(u.profileurl)
|
||||||
|
@ -43,7 +43,8 @@ def sex():
|
||||||
@app.route("/admin/resize", methods=["GET"])
|
@app.route("/admin/resize", methods=["GET"])
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
def resize(v):
|
def resize(v):
|
||||||
gevent.spawn(sex)
|
lex = ""
|
||||||
|
gevent.spawn(sex, lex)
|
||||||
return "sex"
|
return "sex"
|
||||||
|
|
||||||
@app.route("/admin/shadowbanned", methods=["GET"])
|
@app.route("/admin/shadowbanned", methods=["GET"])
|
||||||
|
|
|
@ -869,32 +869,6 @@ def submit_post(v):
|
||||||
g.db.add(new_post.submission_aux)
|
g.db.add(new_post.submission_aux)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
# #csam detection
|
|
||||||
# def del_function():
|
|
||||||
# db=db_session()
|
|
||||||
# delete_file(name)
|
|
||||||
# new_post.is_banned=True
|
|
||||||
# db.add(new_post)
|
|
||||||
# db.commit()
|
|
||||||
# ma=ModAction(
|
|
||||||
# kind="ban_post",
|
|
||||||
# user_id=2317,
|
|
||||||
# note="banned image",
|
|
||||||
# target_submission_id=new_post.id
|
|
||||||
# )
|
|
||||||
# db.add(ma)
|
|
||||||
# db.commit()
|
|
||||||
# db.close()
|
|
||||||
|
|
||||||
|
|
||||||
# csam_thread=threading.Thread(target=check_csam_url,
|
|
||||||
# args=(new_post.url,
|
|
||||||
# v,
|
|
||||||
# del_function
|
|
||||||
# )
|
|
||||||
# )
|
|
||||||
# csam_thread.start()
|
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
# spin off thumbnail generation and csam detection as new threads
|
# spin off thumbnail generation and csam detection as new threads
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue