MCPcopy
hub / github.com/cherrypy/cherrypy / startup_modpython

Function startup_modpython

cherrypy/test/benchmark.py:310–325  ·  view source on GitHub ↗

Start the CherryPy app server in 'serverless' mode (for modpython/WSGI).

(req=None)

Source from the content-addressed store, hash-verified

308# modpython and other WSGI #
309
310def startup_modpython(req=None):
311 """Start the CherryPy app server in 'serverless' mode (for modpython/WSGI).
312 """
313 if cherrypy.engine.state == cherrypy._cpengine.STOPPED:
314 if req:
315 if 'nullreq' in req.get_options():
316 cherrypy.engine.request_class = NullRequest
317 cherrypy.engine.response_class = NullResponse
318 ab_opt = req.get_options().get('ab', '')
319 if ab_opt:
320 global AB_PATH
321 AB_PATH = ab_opt
322 cherrypy.engine.start()
323 if cherrypy.engine.state == cherrypy._cpengine.STARTING:
324 cherrypy.engine.wait()
325 return 0 # apache.OK
326
327
328def run_modpython(use_wsgi=False):

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
startMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…