Merge pull request #556 from seatgeek/post-init

Rename post_init for greater clarity
This commit is contained in:
Randall Leeds 2013-06-20 17:55:24 -07:00
commit e255808012
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