store failed step object in set instead of list
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 16 Oct 2013 15:34:32 +0000 (11:34 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 16 Oct 2013 15:34:32 +0000 (11:34 -0400)
planetstack/observer/event_loop.py

index c83d174..35dd620 100644 (file)
@@ -220,7 +220,7 @@ class PlanetStackObserver:
                 failed_steps = []
 
                 # Set of individual objects within steps that failed
-                failed_step_objects = []
+                failed_step_objects = set()
 
                 for S in self.ordered_steps:
                     step = self.step_lookup[S]
@@ -258,12 +258,12 @@ class PlanetStackObserver:
                             # ********* This is the actual sync step
                             #import pdb
                             #pdb.set_trace()
-                            failed_objects = sync_step(failed=failed_step_objects)
+                            failed_objects = sync_step(failed=list(failed_step_objects))
 
 
                             self.check_duration(sync_step, duration)
                             if failed_objects:
-                                failed_step_objects.extend(failed_objects)
+                                failed_step_objects.update(failed_objects)
                             self.update_run_time(sync_step)
                         except:
                             failed_steps.append(S)