def __init__(self, addr, app, stopfunc, options): self.wsgi_app = app self.ccount = 0 self.stopfunc = stopfunc self.stopfile = options.stopfile self.maxconn = options.maxconn self.sock = gensock.gen_sock(addr, options) self.idletimeout = options.idletimeout
def __init__(self, addr, app, stopfunc, options): self.wsgi_app = app self.ccount = 0 self.stopfunc = stopfunc s = gensock.gen_sock(addr, options) self.pool = prefork.ServerPool(s, self.do_request, options.minconn, options.maxconn, options.perconn) self.pool.stall_on_overload(not options.dropoverload) self.pool.set_min_idle(options.minidle) self.pool.set_idle_timeout(options.idletimeout) self.pool.set_worker_timeout(options.workertimeout)