コード例 #1
0
    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
コード例 #2
0
ファイル: http.py プロジェクト: mkttdw/zenqueue
 def __init__(self, queue=None):
     self.log = log.get_logger('zenq.server.http:%x' % (id(self),))
     self.queue = queue or Queue()
コード例 #3
0
ファイル: common.py プロジェクト: rayshifu/zenqueue
 def __init__(self):
     self.log = log.get_logger(self.log_name + ':%x' % (id(self), ))
コード例 #4
0
ファイル: common.py プロジェクト: mkttdw/zenqueue
 def __init__(self):
     self.log = log.get_logger(self.log_name + ':%x' % (id(self),))
コード例 #5
0
 def __init__(self, queue=None):
     self.log = log.get_logger('zenq.server.http:%x' % (id(self), ))
     self.queue = queue or Queue()