예제 #1
0
    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)
예제 #2
0
    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
        )
예제 #3
0
 def __init__(self, app):
     BaseService.__init__(self, app)
     log.info('NodeDiscovery init')
     # man setsockopt
     self.protocol = DiscoveryProtocol(app=self.app, transport=self)
예제 #4
0
 def __init__(self):
     BaseService.__init__(self, settings.mongo_plan_collections_name)
예제 #5
0
 def __init__(self, app):
     BaseService.__init__(self, app)
     log.info('NodeDiscovery init')
     # man setsockopt
     self.protocol = DiscoveryProtocol(app=self.app, transport=self)
예제 #6
0
 def __init__(self):
     BaseService.__init__(self, 'images')
예제 #7
0
 def __init__(self):
     BaseService.__init__(self, settings.mongo_region_food_collections_name)
예제 #8
0
 def __init__(self, app):
     BaseService.__init__(self, app)
     log.info('PeerManager init')
     self.peers = []