fdsfs
This commit is contained in:
parent
d98c81196d
commit
8b9b2697d0
1 changed files with 66 additions and 50 deletions
|
@ -11,11 +11,26 @@ from flask import *
|
||||||
from files.__main__ import app, limiter, db_session
|
from files.__main__ import app, limiter, db_session
|
||||||
from pusher_push_notifications import PushNotifications
|
from pusher_push_notifications import PushNotifications
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
import gevent
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
|
|
||||||
if PUSHER_ID: beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
if PUSHER_ID: beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
||||||
|
|
||||||
|
def leaderboard_thread():
|
||||||
|
global users1
|
||||||
|
global users2
|
||||||
|
global users3
|
||||||
|
global users4
|
||||||
|
global users5
|
||||||
|
global users6
|
||||||
|
global users7
|
||||||
|
global userss9
|
||||||
|
global users10
|
||||||
|
global userss12
|
||||||
|
global userss13
|
||||||
|
global userss15
|
||||||
|
|
||||||
db = db_session()
|
db = db_session()
|
||||||
|
|
||||||
users = db.query(User)
|
users = db.query(User)
|
||||||
|
@ -76,6 +91,7 @@ userss15 = users15[:25]
|
||||||
|
|
||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
|
gevent.spawn(leaderboard_thread())
|
||||||
@app.get("/grassed")
|
@app.get("/grassed")
|
||||||
@auth_required
|
@auth_required
|
||||||
def grassed(v):
|
def grassed(v):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue