mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
extract to a method
This commit is contained in:
parent
1f8d3b6c37
commit
81f65c2858
@ -117,6 +117,15 @@ class Worker(object):
|
||||
|
||||
self.init_signals()
|
||||
|
||||
self.cfg.post_worker_init(self)
|
||||
|
||||
self.load_wsgi()
|
||||
|
||||
# Enter main run loop
|
||||
self.booted = True
|
||||
self.run()
|
||||
|
||||
def load_wsgi(self):
|
||||
try:
|
||||
self.wsgi = self.app.wsgi()
|
||||
except SyntaxError as e:
|
||||
@ -131,12 +140,6 @@ class Worker(object):
|
||||
tb_string = traceback.format_exc(exc_tb)
|
||||
self.wsgi = util.make_fail_app(tb_string)
|
||||
|
||||
self.cfg.post_worker_init(self)
|
||||
|
||||
# Enter main run loop
|
||||
self.booted = True
|
||||
self.run()
|
||||
|
||||
def init_signals(self):
|
||||
# reset signaling
|
||||
[signal.signal(s, signal.SIG_DFL) for s in self.SIGNALS]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user