Fixed incorrect example config. (Since 036f8b5 it's been pre/post for hooks, not before/after)

This commit is contained in:
Ben Cochran 2010-10-30 04:31:46 +08:00 committed by Benoit Chesneau
parent 2ad2a61f0c
commit e7938fa3df

View File

@ -173,26 +173,26 @@ proc_name = None
# #
# Server hooks # Server hooks
# #
# after_fork - Called just after a worker has been forked. # post_fork - Called just after a worker has been forked.
# #
# A callable that takes a server and worker instance # A callable that takes a server and worker instance
# as arguments. # as arguments.
# #
# before_fork - Called just prior to forking the worker subprocess. # pre_fork - Called just prior to forking the worker subprocess.
# #
# A callable that accepts the same arguments as after_fork # A callable that accepts the same arguments as after_fork
# #
# before_exec - Called just prior to forking off a secondary # pre_exec - Called just prior to forking off a secondary
# master process during things like config reloading. # master process during things like config reloading.
# #
# A callable that takes a server instance as the sole argument. # A callable that takes a server instance as the sole argument.
# #
def after_fork(server, worker): def post_fork(server, worker):
server.log.info("Worker spawned (pid: %s)" % worker.pid) server.log.info("Worker spawned (pid: %s)" % worker.pid)
def before_fork(server, worker): def pre_fork(server, worker):
pass pass
def before_exec(server): def pre_exec(server):
server.log.info("Forked child, re-executing.") server.log.info("Forked child, re-executing.")