예제 #1
0
 def run(self, handler):
     from eventlet import wsgi, listen
     try:
         wsgi.server(listen((self.host, self.port)),
                     handler,
                     log_output=(not self.quiet))
     except TypeError:
         # Fallback, if we have old version of eventlet
         wsgi.server(listen((self.host, self.port)), handler)
예제 #2
0
    def run(self, handler):
        from eventlet import wsgi, listen

        try:
            wsgi.server(listen((self.host, self.port)), handler,
                log_output=(not self.quiet))
        except TypeError:
            # Needed to ignore the log
            class NoopLog:
                def write(self, *args):
                    pass

            # Fallback, if we have old version of eventlet
            wsgi.server(listen((self.host, self.port)), handler, log=NoopLog())
예제 #3
0
    def run(self, handler):
        from eventlet import wsgi, listen

        try:
            wsgi.server(listen((self.host, self.port)),
                        handler,
                        log_output=(not self.quiet))
        except TypeError:
            # Needed to ignore the log
            class NoopLog:
                def write(self, *args):
                    pass

            # Fallback, if we have old version of eventlet
            wsgi.server(listen((self.host, self.port)), handler, log=NoopLog())
예제 #4
0
파일: adapter.py 프로젝트: DxfAndCxx/cottle
 def run(self, handler):
     from eventlet import wsgi, listen, patcher
     if not patcher.is_monkey_patched(os):
         msg = "Bottle requires eventlet.monkey_patch() (before import)"
         raise RuntimeError(msg)
     socket_args = {}
     for arg in ('backlog', 'family'):
         try:
             socket_args[arg] = self.options.pop(arg)
         except KeyError:
             pass
     address = (self.host, self.port)
     try:
         wsgi.server(listen(address, **socket_args), handler,
                     log_output=(not self.quiet))
     except TypeError:
         # Fallback, if we have old version of eventlet
         wsgi.server(listen(address), handler)
예제 #5
0
파일: server.py 프로젝트: perryhau/Mole
 def run(self, handler):
     from eventlet import wsgi, listen
     wsgi.server(listen((self.host, self.port)), handler)
예제 #6
0
 def eventlet(app, address, **options):
     from eventlet import wsgi, listen
     wsgi.server(listen(address), app)
예제 #7
0
 def eventlet(app, address, **options):
     from eventlet import wsgi, listen
     wsgi.server(listen(address), app)
예제 #8
0
파일: server.py 프로젝트: toohamster/YouMd
 def run(self, handler):
     from eventlet import wsgi, listen
     wsgi.server(listen((self.host, self.port)), handler)
예제 #9
0
 def eventlet(app, address, **options):
     from gevent import monkey
     monkey.patch_all()
     from eventlet import wsgi, listen
     wsgi.server(listen(address), app)
예제 #10
0
파일: anyserver.py 프로젝트: x91111/web3py
 def eventlet(app, address, **options):
     from gevent import monkey
     monkey.patch_all()
     from eventlet import wsgi, listen
     wsgi.server(listen(address), app)