MCPcopy Create free account
hub / github.com/SolSaviour/INFO1112-Materials / run

Method run

Week 6/server.py:3347–3366  ·  view source on GitHub ↗
(self, handler)

Source from the content-addressed store, hash-verified

3345 """ Extremely fast webserver using libev. See http://www.fapws.org/ """
3346
3347 def run(self, handler): # pragma: no cover
3348 import fapws._evwsgi as evwsgi
3349 from fapws import base, config
3350 port = self.port
3351 if float(config.SERVER_IDENT[-2:]) > 0.4:
3352 # fapws3 silently changed its API in 0.5
3353 port = str(port)
3354 evwsgi.start(self.host, port)
3355 # fapws3 never releases the GIL. Complain upstream. I tried. No luck.
3356 if 'BOTTLE_CHILD' in os.environ and not self.quiet:
3357 _stderr("WARNING: Auto-reloading does not work with Fapws3.\n")
3358 _stderr(" (Fapws3 breaks python thread support)\n")
3359 evwsgi.set_base_module(base)
3360
3361 def app(environ, start_response):
3362 environ['wsgi.multiprocess'] = False
3363 return handler(environ, start_response)
3364
3365 evwsgi.wsgi_cb(('', app))
3366 evwsgi.run()
3367
3368
3369class TornadoServer(ServerAdapter):

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected