diff --git a/django/core/servers/fastcgi.py b/django/core/servers/fastcgi.py
index cacac3d..f20a338 100644
|
a
|
b
|
from django.utils import importlib
|
| 19 | 19 | __version__ = "0.1" |
| 20 | 20 | __all__ = ["runfastcgi"] |
| 21 | 21 | |
| | 22 | FASTCGI_OPTIONS = { |
| | 23 | 'protocol': 'fcgi', |
| | 24 | 'host': None, |
| | 25 | 'port': None, |
| | 26 | 'socket': None, |
| | 27 | 'method': 'fork', |
| | 28 | 'daemonize': None, |
| | 29 | 'workdir': '/', |
| | 30 | 'pidfile': None, |
| | 31 | 'maxspare': 5, |
| | 32 | 'minspare': 2, |
| | 33 | 'maxchildren': 50, |
| | 34 | 'maxrequests': 0, |
| | 35 | 'debug': None, |
| | 36 | 'outlog': None, |
| | 37 | 'errlog': None, |
| | 38 | 'umask': None, |
| | 39 | } |
| | 40 | |
| 22 | 41 | FASTCGI_HELP = r""" |
| 23 | 42 | Run this project as a fastcgi (or some other protocol supported |
| 24 | 43 | by flup) application. To do this, the flup package from |
| … |
… |
FASTCGI_HELP = r"""
|
| 27 | 46 | runfcgi [options] [fcgi settings] |
| 28 | 47 | |
| 29 | 48 | Optional Fcgi settings: (setting=value) |
| 30 | | protocol=PROTOCOL fcgi, scgi, ajp, ... (default fcgi) |
| | 49 | protocol=PROTOCOL fcgi, scgi, ajp, ... (default %(protocol)s) |
| 31 | 50 | host=HOSTNAME hostname to listen on. |
| 32 | 51 | port=PORTNUM port to listen on. |
| 33 | 52 | socket=FILE UNIX socket to listen on. |
| 34 | | method=IMPL prefork or threaded (default prefork). |
| | 53 | method=IMPL prefork or threaded (default %(method)s). |
| 35 | 54 | maxrequests=NUMBER number of requests a child handles before it is |
| 36 | 55 | killed and a new child is forked (0 = no limit). |
| 37 | | maxspare=NUMBER max number of spare processes / threads. |
| 38 | | minspare=NUMBER min number of spare processes / threads. |
| 39 | | maxchildren=NUMBER hard limit number of processes / threads. |
| | 56 | maxspare=NUMBER max number of spare processes / threads (default %(maxspare)s). |
| | 57 | minspare=NUMBER min number of spare processes / threads (default %(minspare)s). |
| | 58 | maxchildren=NUMBER hard limit number of processes / threads (default %(maxchildren)s). |
| 40 | 59 | daemonize=BOOL whether to detach from terminal. |
| 41 | 60 | pidfile=FILE write the spawned process-id to this file. |
| 42 | | workdir=DIRECTORY change to this directory when daemonizing. |
| | 61 | workdir=DIRECTORY change to this directory when daemonizing (default %(workdir)s). |
| 43 | 62 | debug=BOOL set to true to enable flup tracebacks. |
| 44 | 63 | outlog=FILE write stdout to this file. |
| 45 | 64 | errlog=FILE write stderr to this file. |
| … |
… |
Examples:
|
| 60 | 79 | $ manage.py runfcgi socket=/tmp/fcgi.sock method=prefork \ |
| 61 | 80 | daemonize=true pidfile=/var/run/django-fcgi.pid |
| 62 | 81 | |
| 63 | | """ |
| 64 | | |
| 65 | | FASTCGI_OPTIONS = { |
| 66 | | 'protocol': 'fcgi', |
| 67 | | 'host': None, |
| 68 | | 'port': None, |
| 69 | | 'socket': None, |
| 70 | | 'method': 'fork', |
| 71 | | 'daemonize': None, |
| 72 | | 'workdir': '/', |
| 73 | | 'pidfile': None, |
| 74 | | 'maxspare': 5, |
| 75 | | 'minspare': 2, |
| 76 | | 'maxchildren': 50, |
| 77 | | 'maxrequests': 0, |
| 78 | | 'debug': None, |
| 79 | | 'outlog': None, |
| 80 | | 'errlog': None, |
| 81 | | 'umask': None, |
| 82 | | } |
| | 82 | """ % FASTCGI_OPTIONS |
| 83 | 83 | |
| 84 | 84 | def fastcgi_help(message=None): |
| 85 | 85 | print FASTCGI_HELP |