You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/source/custom.rst
+19
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,25 @@ a custom Application:
16
16
:start-after: # See the NOTICE for more information
17
17
:lines: 2-
18
18
19
+
Using server hooks
20
+
------------------
21
+
22
+
If you wish to include server hooks in your custom application, you can specify a function in the config options. Here is an example with the `pre_fork` hook:
23
+
24
+
.. code-block:: python
25
+
26
+
defpre_fork(server, worker):
27
+
print(f"pre-fork server {server} worker {worker}", file=sys.stderr)
0 commit comments