Rename post_init for greater clarity

Makes sense if you saw what it does, less if you just read the config option.
This commit is contained in:
Philip Cristiano 2013-06-20 19:40:03 -04:00
parent ef6f831971
commit dcfe825346
3 changed files with 7 additions and 7 deletions

View File

@ -561,12 +561,12 @@ Called just after a worker has been forked.
The callable needs to accept two instance variables for the Arbiter and The callable needs to accept two instance variables for the Arbiter and
new Worker. new Worker.
post_init post_worker_init
~~~~~~~~~ ~~~~~~~~~
* :: * ::
def post_init(worker): def post_worker_init(worker):
pass pass
Called just after a worker has initialized the application. Called just after a worker has initialized the application.

View File

@ -1162,16 +1162,16 @@ class Postfork(Setting):
""" """
class PostInit(Setting): class PostWorkerInit(Setting):
name = "post_init" name = "post_worker_init"
section = "Server Hooks" section = "Server Hooks"
validator = validate_callable(1) validator = validate_callable(1)
type = six.callable type = six.callable
def post_init(worker): def post_worker_init(worker):
pass pass
default = staticmethod(post_init) default = staticmethod(post_worker_init)
desc = """\ desc = """\
Called just after a worker has initialized the application. Called just after a worker has initialized the application.

View File

@ -99,7 +99,7 @@ class Worker(object):
self.wsgi = self.app.wsgi() self.wsgi = self.app.wsgi()
self.cfg.post_init(self) self.cfg.post_worker_init(self)
# Enter main run loop # Enter main run loop
self.booted = True self.booted = True