parent
68c91d8d8b
commit
84b705697d
|
@ -9,22 +9,6 @@ from files.helpers.get import *
|
||||||
|
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter
|
||||||
|
|
||||||
@app.get("/retrofix")
|
|
||||||
@admin_level_required(5)
|
|
||||||
def chats_retrofix(v):
|
|
||||||
for chat in g.db.query(Chat).order_by(Chat.id):
|
|
||||||
if chat.id == 1: continue
|
|
||||||
owner_id = g.db.query(ChatMessage.user_id).filter_by(chat_id=chat.id).order_by(ChatMessage.created_utc).first()
|
|
||||||
print(chat.id, owner_id, flush=True)
|
|
||||||
if owner_id:
|
|
||||||
owner_id = owner_id[0]
|
|
||||||
membership = g.db.query(ChatMembership).filter_by(chat_id=chat.id, user_id=owner_id).one_or_none()
|
|
||||||
if membership:
|
|
||||||
membership.created_utc -= 1
|
|
||||||
g.db.add(membership)
|
|
||||||
|
|
||||||
return ('success')
|
|
||||||
|
|
||||||
@app.get("/chat")
|
@app.get("/chat")
|
||||||
@app.get("/orgy")
|
@app.get("/orgy")
|
||||||
def chat_redirect():
|
def chat_redirect():
|
||||||
|
|
|
@ -6,7 +6,7 @@ bind = '0.0.0.0:5000'
|
||||||
|
|
||||||
worker_class = 'gevent'
|
worker_class = 'gevent'
|
||||||
workers = int(environ.get("WORKER_COUNT").strip())
|
workers = int(environ.get("WORKER_COUNT").strip())
|
||||||
timeout = 120
|
|
||||||
max_requests = 5000
|
max_requests = 5000
|
||||||
max_requests_jitter = 10000
|
max_requests_jitter = 10000
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue