def __init__(self, queue=None, max_size=DEFAULT_MAX_CONC_REQUESTS): self.log = log.get_logger('zenq.server.native:%x' % (id(self), )) # An initial queue may be provided; this might help with durable queues # (i.e. those that save their state to disk and can restore it on load). self.queue = queue or Queue() # The client pool is a pool of coroutines which doesn't allow more than # max_size coroutines to be running 'at the same time' (although # strictly speaking they never do anyway). In this case it represents # the maximum number of clients that may be connected at once. self.client_pool = coros.CoroutinePool(max_size=max_size) self.socket = None
def __init__(self, queue=None): self.log = log.get_logger('zenq.server.http:%x' % (id(self),)) self.queue = queue or Queue()
def __init__(self): self.log = log.get_logger(self.log_name + ':%x' % (id(self), ))
def __init__(self): self.log = log.get_logger(self.log_name + ':%x' % (id(self),))
def __init__(self, queue=None): self.log = log.get_logger('zenq.server.http:%x' % (id(self), )) self.queue = queue or Queue()