forked from bton/matekasse
removed all prints
This commit is contained in:
parent
69cd99d3e3
commit
d1f9c7a988
1 changed files with 0 additions and 6 deletions
6
main.py
6
main.py
|
@ -89,28 +89,22 @@ def get_addtag_request():
|
||||||
except: #except im Normalen Code!
|
except: #except im Normalen Code!
|
||||||
return "Wrong user id!"
|
return "Wrong user id!"
|
||||||
users.put(user_id)
|
users.put(user_id)
|
||||||
print(f"put: {len(users.queue)}")
|
|
||||||
return render_template("addtag.html", user=user_id)
|
return render_template("addtag.html", user=user_id)
|
||||||
|
|
||||||
@socketio.on('addtag')
|
@socketio.on('addtag')
|
||||||
def request_addtag(data):
|
def request_addtag(data):
|
||||||
global finished
|
global finished
|
||||||
print(f"add tag: {len(users.queue)}")
|
|
||||||
if len(users.queue) > 0:
|
if len(users.queue) > 0:
|
||||||
user = users.queue[len(users.queue) - 1]
|
user = users.queue[len(users.queue) - 1]
|
||||||
if user == data["data"]:
|
if user == data["data"]:
|
||||||
socketio.emit("wait", "wait")
|
socketio.emit("wait", "wait")
|
||||||
i = 0
|
i = 0
|
||||||
while finished != data["data"]:
|
while finished != data["data"]:
|
||||||
print("waiting")
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
i += 1
|
i += 1
|
||||||
if i > 20:
|
if i > 20:
|
||||||
print("timeout")
|
|
||||||
socketio.emit("error", "timeout")
|
socketio.emit("error", "timeout")
|
||||||
nothing = users.get()
|
nothing = users.get()
|
||||||
print(f"nothing: {nothing}")
|
|
||||||
print("cleared")
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
finished = None
|
finished = None
|
||||||
|
|
Loading…
Reference in a new issue