def pulsar(app, address, **options):
     from pulsar.apps import wsgi
     sys.argv = ['anyserver.py']
     s = wsgi.WSGIServer(callable=app, bind="%s:%d" % address)
     s.start()
Beispiel #2
0
 def run(self, handler):
     from gevent import wsgi
     #from gevent.hub import getcurrent
     #self.set_context_ident(getcurrent, weakref=True) # see contextlocal
     wsgi.WSGIServer((self.host, self.port), handler).serve_forever()