Added interrupt handler to inflight wait
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c430232df0
commit
423cb1b442
@ -337,10 +337,13 @@ def run_benchmark(
|
||||
total_successful_uploads = len([req for req in results.values() if req.upload_status_code == 200])
|
||||
|
||||
# Wait for inflight messages for a little
|
||||
for _ in range(int(inflight_timeout)):
|
||||
time.sleep(1)
|
||||
if returned_queue.qsize() >= total_successful_uploads:
|
||||
break
|
||||
try:
|
||||
for _ in range(int(inflight_timeout)):
|
||||
time.sleep(1)
|
||||
if returned_queue.qsize() >= total_successful_uploads:
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
print("jovan akkor nem várom meg...")
|
||||
|
||||
mqtt_client.disconnect()
|
||||
mqtt_client.loop_stop() # This stops further recieving MQTT messages
|
||||
|
Loading…
Reference in New Issue
Block a user