Fixed shuffle in Docker
This commit is contained in:
parent
00d91580aa
commit
a088db6ded
7
app.py
7
app.py
@ -23,6 +23,11 @@ app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_
|
||||
socketio = SocketIO(app,cors_allowed_origins=os.getenv("DOMAIN_NAME"))
|
||||
count = 0
|
||||
|
||||
if os.getenv("RANDOM") == 'True':
|
||||
RANDOM = True
|
||||
else:
|
||||
RANDOM = False
|
||||
|
||||
if os.getenv("LINKS"):
|
||||
LINKS = os.getenv("LINKS")
|
||||
else:
|
||||
@ -663,7 +668,7 @@ def index():
|
||||
|
||||
results = cursor.fetchall()
|
||||
set_list = [list(i) for i in results]
|
||||
if os.getenv("RANDOM") == True:
|
||||
if RANDOM:
|
||||
random.shuffle(set_list)
|
||||
cursor.execute('SELECT DISTINCT u_id from missing;')
|
||||
results = cursor.fetchall()
|
||||
|
Loading…
Reference in New Issue
Block a user