def _func_on_containers(logger, conf, concurrency_key, func):
 bench = Bench(logger, conf, [])
 pool = eventlet.GreenPool(int(getattr(conf, concurrency_key)))
 for container in conf.containers:
  pool.spawn_n(func, bench.url, bench.token, container)
 pool.waitall()

def _func_on_containers ( logger , conf , concurrency_key , func ) : bench = Bench ( logger , conf , [ ] ) pool = eventlet . GreenPool ( int ( getattr ( conf , concurrency_key ) ) ) for container in conf . containers : pool . spawn_n ( func , bench . url , bench . token , container ) pool . waitall ( )
run a function on each container with concurrency .