From 92effdddb4033713531504646ebb62668ee42ddd Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Thu, 2 Nov 2023 13:07:07 +0100 Subject: [PATCH] controller: Add experiment_index to p_list --- controller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controller.py b/controller.py index d0466cc..73480b2 100755 --- a/controller.py +++ b/controller.py @@ -735,7 +735,6 @@ def controller( and queue_output.qsize() < queuedepth ): faults = faultlist[itter] - itter += 1 p = Process( name=f"worker_{faults['index']}", @@ -754,12 +753,16 @@ def controller( ), ) p.start() - p_list.append({"process": p, "start_time": time.time()}) + p_list.append( + {"process": p, "start_time": time.time(), "experiment_index": itter} + ) clogger.debug(f"Started worker {faults['index']}. Running: {len(p_list)}.") clogger.debug(f"Fault address: {faults['faultlist'][0].address}") clogger.debug( f"Fault trigger address: {faults['faultlist'][0].trigger.address}" ) + + itter += 1 else: time.sleep(0.005) # wait for workers to finish, scheduler can wait