From 4211be4df4b55c45a195427bed2d83b10a930fb3 Mon Sep 17 00:00:00 2001
From: "Paul J. Davis"
Date: Wed, 27 Apr 2011 15:07:59 -0400
Subject: [PATCH] Reorder hook config section to be more logical.
---
doc/htdocs/configure.html | 40 +++++++++++++++++++--------------------
gunicorn/config.py | 29 ++++++++++++++--------------
2 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/doc/htdocs/configure.html b/doc/htdocs/configure.html
index c194c95c..d0f57dcc 100644
--- a/doc/htdocs/configure.html
+++ b/doc/htdocs/configure.html
@@ -398,6 +398,18 @@ module.
+
+
+
+
Called just before the master process is initialized.
+
The callable needs to accept a single instance variable for the Arbiter.
+
-
-
-
-
Called just before the master process is initialized.
-
The callable needs to accept a single instance variable for the Arbiter.
-
@@ -560,14 +560,14 @@ def on_starting(server):
Server Hooks
diff --git a/gunicorn/config.py b/gunicorn/config.py
index e69efe24..268d8149 100644
--- a/gunicorn/config.py
+++ b/gunicorn/config.py
@@ -594,6 +594,20 @@ class DefaultProcName(Setting):
Internal setting that is adjusted for each type of application.
"""
+class OnStarting(Setting):
+ name = "on_starting"
+ section = "Server Hooks"
+ validator = validate_callable(1)
+ type = "callable"
+ def on_starting(server):
+ pass
+ default = staticmethod(on_starting)
+ desc = """\
+ Called just before the master process is initialized.
+
+ The callable needs to accept a single instance variable for the Arbiter.
+ """
+
class WhenReady(Setting):
name = "when_ready"
section = "Server Hooks"
@@ -696,18 +710,3 @@ class WorkerExit(Setting):
The callable needs to accept two instance variables for the Arbiter and
the just-exited Worker.
"""
-
-class OnStarting(Setting):
- name = "on_starting"
- section = "Server Hooks"
- validator = validate_callable(1)
- type = "callable"
- def on_starting(server):
- pass
- default = staticmethod(on_starting)
- desc = """\
- Called just before the master process is initialized.
-
- The callable needs to accept a single instance variable for the Arbiter.
- """
-