def start(num=2): for i in xrange(num): p = Process(name="worker-%d" % i, target=run, args=(hello_world,i)) workers.append(p) p.start() meinheld.set_process_name("hello_world-master");
def run(app, i): meinheld.set_process_name("hello_world-worker-%d" % i); meinheld.run(app)