This commit is contained in:
Mateusz779 2023-04-14 11:54:28 +02:00
parent ee19803704
commit af3a946d20
2 changed files with 1 additions and 3 deletions

2
app.py
View File

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

2
db.py
View File

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