Ticket #6163: 6163-2.diff

File 6163-2.diff, 2.9 KB (added by Claude Paroz, 13 years ago)

Patch updated to current trunk (method option untouched)

  • django/core/servers/fastcgi.py

    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  
    1919__version__ = "0.1"
    2020__all__ = ["runfastcgi"]
    2121
     22FASTCGI_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
    2241FASTCGI_HELP = r"""
    2342  Run this project as a fastcgi (or some other protocol supported
    2443  by flup) application. To do this, the flup package from
    FASTCGI_HELP = r"""  
    2746   runfcgi [options] [fcgi settings]
    2847
    2948Optional Fcgi settings: (setting=value)
    30   protocol=PROTOCOL    fcgi, scgi, ajp, ... (default fcgi)
     49  protocol=PROTOCOL    fcgi, scgi, ajp, ... (default %(protocol)s)
    3150  host=HOSTNAME        hostname to listen on.
    3251  port=PORTNUM         port to listen on.
    3352  socket=FILE          UNIX socket to listen on.
    34   method=IMPL          prefork or threaded (default prefork).
     53  method=IMPL          prefork or threaded (default %(method)s).
    3554  maxrequests=NUMBER   number of requests a child handles before it is
    3655                       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).
    4059  daemonize=BOOL       whether to detach from terminal.
    4160  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).
    4362  debug=BOOL           set to true to enable flup tracebacks.
    4463  outlog=FILE          write stdout to this file.
    4564  errlog=FILE          write stderr to this file.
    Examples:  
    6079    $ manage.py runfcgi socket=/tmp/fcgi.sock method=prefork \
    6180        daemonize=true pidfile=/var/run/django-fcgi.pid
    6281
    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
    8383
    8484def fastcgi_help(message=None):
    8585    print FASTCGI_HELP
Back to Top