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