diff --git a/app.py b/app.py index 8a672b6..4bf5f46 100644 --- a/app.py +++ b/app.py @@ -38,9 +38,7 @@ class PingThread(threading.Thread): def check_allocation_thread_function(): while True: ids = db.get_image_allocation_all() - print(ids) for x in ids: - print(x[0]) ip = db.get_image_allocation_clientip_id(x[0]) ping_thread = PingThread(ip, x[0]) ping_thread.start() diff --git a/db.py b/db.py index 04ce969..784127b 100644 --- a/db.py +++ b/db.py @@ -150,7 +150,7 @@ def get_image_allocation_all(): connect() with get_cur() as cur: cur.execute(""" - SELECT image_id FROM image_allocation""") + SELECT id FROM image_allocation""") try: results = [list(row) for row in cur.fetchall()] return results