Commit 7cee3e69 authored by Jérome Perrin's avatar Jérome Perrin

ACO: quick hack for a safe demo, skip scenarios with errors

parent b4150f93
......@@ -122,9 +122,16 @@ class Simulation(DefaultSimulation):
scenario_list.append(ant)
if distributor is None:
successful_scenario_list = []
# synchronous
for ant in scenario_list:
ant['result'] = DefaultSimulation.runOneScenario(self, ant['input'])
try:
ant['result'] = DefaultSimulation.runOneScenario(self, ant['input'])
successful_scenario_list.append(ant)
except Exception, e:
print "Error executing scenario, skipping ant. Scenaro was:\n%s" % ant['input']
scenario_list = successful_scenario_list
else: # asynchronous
job_id = distributor.requestSimulationRun(
[json.dumps(x) for x in scenario_list])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment