def __init__(self, app): log.debug('initializing JSONRPCServer') BaseService.__init__(self, app) self.app = app self.dispatcher = RPCDispatcher() transport = WsgiServerTransport(queue_class=gevent.queue.Queue) # start wsgi server as a background-greenlet self.wsgi_server = gevent.wsgi.WSGIServer(('127.0.0.1', 5000), transport.handle) self.rpc_server = RPCServerGreenlets(transport, JSONRPCProtocol(), self.dispatcher)
def __init__(self, app): log.debug('initializing JSONRPCServer') BaseService.__init__(self, app) self.app = app self.dispatcher = RPCDispatcher() transport = WsgiServerTransport(queue_class=gevent.queue.Queue) # start wsgi server as a background-greenlet self.wsgi_server = gevent.wsgi.WSGIServer(('127.0.0.1', 5000), transport.handle) self.rpc_server = RPCServerGreenlets( transport, JSONRPCProtocol(), self.dispatcher )
def __init__(self, app): BaseService.__init__(self, app) log.info('NodeDiscovery init') # man setsockopt self.protocol = DiscoveryProtocol(app=self.app, transport=self)
def __init__(self): BaseService.__init__(self, settings.mongo_plan_collections_name)
def __init__(self): BaseService.__init__(self, 'images')
def __init__(self): BaseService.__init__(self, settings.mongo_region_food_collections_name)
def __init__(self, app): BaseService.__init__(self, app) log.info('PeerManager init') self.peers = []