mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
when_ready hook. Called just after the server is started
This commit is contained in:
parent
f8fac58d73
commit
4005614ced
@ -97,7 +97,7 @@ class Arbiter(object):
|
||||
self.pidfile.create(self.pid)
|
||||
self.log.info("Arbiter booted")
|
||||
self.log.info("Listening at: %s" % self.LISTENER)
|
||||
|
||||
self.cfg.when_ready(self)
|
||||
|
||||
def init_signals(self):
|
||||
"""\
|
||||
|
||||
@ -536,3 +536,17 @@ with Setting("pre_exec") as s:
|
||||
|
||||
The callable needs to accept a single instance variable for the Arbiter.
|
||||
""")
|
||||
|
||||
|
||||
with Setting("when_ready") as s:
|
||||
s.section = "Server Hooks"
|
||||
s.validator = validate_callable(1)
|
||||
s.type = "callable"
|
||||
def def_start_server(server):
|
||||
pass
|
||||
s.default = def_start_server
|
||||
s.fmt_desc("""\
|
||||
Called just after the server is started
|
||||
|
||||
The callable needs to accept a single instance variable for the Arbiter.
|
||||
""")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user