MCPcopy
hub / github.com/benoitc/gunicorn / load_wsgi

Method load_wsgi

gunicorn/workers/base.py:146–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 self.run()
145
146 def load_wsgi(self):
147 try:
148 self.wsgi = self.app.wsgi()
149 except SyntaxError as e:
150 if not self.cfg.reload:
151 raise
152
153 self.log.exception(e)
154
155 if self.reloader is not None and e.filename is not None:
156 self.reloader.add_extra_file(e.filename)
157
158 with io.StringIO() as tb_string:
159 traceback.print_exception(e, file=tb_string)
160 self.wsgi = util.make_fail_app(tb_string.getvalue())
161
162 def init_signals(self):
163 # reset signaling

Callers 2

init_processMethod · 0.95

Calls 3

wsgiMethod · 0.45
exceptionMethod · 0.45
add_extra_fileMethod · 0.45

Tested by 1