Fixed pairing
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2020-10-23 16:48:27 +02:00
parent 144bc86485
commit f09e8abbf2

View File

@ -266,11 +266,18 @@ def main():
except queue.Empty: except queue.Empty:
break break
try: # super ghetto pairing
benchmark_results[returned_job.id].alert_arrived = returned_job.arrived paired = False
except KeyError: for benchmark_result in benchmark_results:
if benchmark_result.id == returned_job.id:
benchmark_result.alert_arrived = returned_job.arrived
paired = True
break
if not paired:
print("Bruh moment: Alert arrived with an id that's not sent", returned_job.id) print("Bruh moment: Alert arrived with an id that's not sent", returned_job.id)
total_answered += 1 total_answered += 1
# print some mini statistics # print some mini statistics