1
0
Fork 0
forked from bton/matekasse

Removed all print statments

This commit is contained in:
2000-Trek 2023-06-14 21:46:10 +02:00
parent cf4dce5bfe
commit 31e14e7757

View file

@ -15,7 +15,6 @@ c = conn.cursor()
app = Flask(__name__) app = Flask(__name__)
key = str(uuid.uuid4().hex) key = str(uuid.uuid4().hex)
app.config['SESSION_TYPE'] = 'filesystem' app.config['SESSION_TYPE'] = 'filesystem'
print(key)
app.config['SECRET_KEY'] = key app.config['SECRET_KEY'] = key
Session(app) Session(app)
socketio = SocketIO(app) socketio = SocketIO(app)
@ -179,7 +178,7 @@ def request_addtag(data):
if message == "Tag already exists": if message == "Tag already exists":
socketio.emit("finished", f"{message}") socketio.emit("finished", f"{message}")
else: else:
socketio.emit("finished", f"Added {message} to {username}", to=session[id]) #print tagid socketio.emit("finished", f"Added {message} to {username}", to=session[id])
else: else:
socketio.emit("busy", "busy", to=session[id]) socketio.emit("busy", "busy", to=session[id])
else: else:
@ -209,7 +208,6 @@ def request_removetag(data):
if queue_item == [data["data"], "remove", session[id]]: if queue_item == [data["data"], "remove", session[id]]:
socketio.emit("wait", "wait", to=session[id]) socketio.emit("wait", "wait", to=session[id])
i = 0 i = 0
print(session[id])
while finished != [data["data"], "remove", session[id]]: while finished != [data["data"], "remove", session[id]]:
time.sleep(1) time.sleep(1)
i += 1 i += 1
@ -242,11 +240,8 @@ def get_id():
tag_list = c.fetchall() tag_list = c.fetchall()
if users.qsize() > 0: if users.qsize() > 0:
queue_item = users.get() queue_item = users.get()
print(queue_item)
user = queue_item[0] user = queue_item[0]
print(f"user: {user}")
state = queue_item[1] state = queue_item[1]
print(state)
if state == "add": if state == "add":
c.execute(f"SELECT * FROM tags WHERE tagid={tag_id}") c.execute(f"SELECT * FROM tags WHERE tagid={tag_id}")
if c.fetchall() != []: if c.fetchall() != []:
@ -257,7 +252,6 @@ def get_id():
elif state == "remove": elif state == "remove":
c.execute(f"SELECT * FROM tags WHERE (tagid = {tag_id} AND userid = {user})") c.execute(f"SELECT * FROM tags WHERE (tagid = {tag_id} AND userid = {user})")
tags = c.fetchall() tags = c.fetchall()
print(f"tags: {tags}")
if tags != []: if tags != []:
c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ") c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ")
message = tag_id message = tag_id