1
0
Fork 0
forked from bton/matekasse

removed all prints

This commit is contained in:
2000-Trek 2023-06-07 19:42:39 +02:00
parent 69cd99d3e3
commit d1f9c7a988

View file

@ -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