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!
|
||||
return "Wrong user id!"
|
||||
users.put(user_id)
|
||||
print(f"put: {len(users.queue)}")
|
||||
return render_template("addtag.html", user=user_id)
|
||||
|
||||
@socketio.on('addtag')
|
||||
def request_addtag(data):
|
||||
global finished
|
||||
print(f"add tag: {len(users.queue)}")
|
||||
if len(users.queue) > 0:
|
||||
user = users.queue[len(users.queue) - 1]
|
||||
if user == data["data"]:
|
||||
socketio.emit("wait", "wait")
|
||||
i = 0
|
||||
while finished != data["data"]:
|
||||
print("waiting")
|
||||
time.sleep(1)
|
||||
i += 1
|
||||
if i > 20:
|
||||
print("timeout")
|
||||
socketio.emit("error", "timeout")
|
||||
nothing = users.get()
|
||||
print(f"nothing: {nothing}")
|
||||
print("cleared")
|
||||
break
|
||||
else:
|
||||
finished = None
|
||||
|
|
Loading…
Reference in a new issue