Ticket #6163: runfcgi_default.diff

File runfcgi_default.diff, 2.7 KB (added by Alexey Shamrin, 16 years ago)
  • django/core/servers/fastcgi.py

     
    1717__version__ = "0.1"
    1818__all__ = ["runfastcgi"]
    1919
     20FASTCGI_OPTIONS = {
     21    'protocol': 'fcgi',
     22    'host': None,
     23    'port': None,
     24    'socket': None,
     25    'method': 'prefork',
     26    'daemonize': None,
     27    'workdir': '/',
     28    'pidfile': None,
     29    'maxspare': 5,
     30    'minspare': 2,
     31    'maxchildren': 50,
     32    'maxrequests': 0,
     33}
     34
    2035FASTCGI_HELP = r"""
    2136  Run this project as a fastcgi (or some other protocol supported
    2237  by flup) application. To do this, the flup package from
     
    2540   runfcgi [options] [fcgi settings]
    2641
    2742Optional Fcgi settings: (setting=value)
    28   protocol=PROTOCOL    fcgi, scgi, ajp, ... (default fcgi)
    29   host=HOSTNAME        hostname to listen on..
     43  protocol=PROTOCOL    fcgi, scgi, ajp, ... (default %(protocol)s)
     44  host=HOSTNAME        hostname to listen on.
    3045  port=PORTNUM         port to listen on.
    3146  socket=FILE          UNIX socket to listen on.
    32   method=IMPL          prefork or threaded (default prefork)
     47  method=IMPL          prefork or threaded (default %(method)s)
    3348  maxrequests=NUMBER   number of requests a child handles before it is
    3449                       killed and a new child is forked (0 = no limit).
    35   maxspare=NUMBER      max number of spare processes / threads
    36   minspare=NUMBER      min number of spare processes / threads.
    37   maxchildren=NUMBER   hard limit number of processes / threads
     50  maxspare=NUMBER      max number of spare processes / threads (default %(maxspare)s)
     51  minspare=NUMBER      min number of spare processes / threads (default %(minspare)s)
     52  maxchildren=NUMBER   hard limit number of processes / threads (default %(maxchildren)s)
    3853  daemonize=BOOL       whether to detach from terminal.
    3954  pidfile=FILE         write the spawned process-id to this file.
    40   workdir=DIRECTORY    change to this directory when daemonizing
     55  workdir=DIRECTORY    change to this directory when daemonizing (default %(workdir)s)
    4156
    4257Examples:
    4358  Run a "standard" fastcgi process on a file-descriptor
     
    5469    $ manage.py runfcgi socket=/tmp/fcgi.sock method=prefork \
    5570        daemonize=true pidfile=/var/run/django-fcgi.pid
    5671
    57 """
     72""" % FASTCGI_OPTIONS
    5873
    59 FASTCGI_OPTIONS = {
    60     'protocol': 'fcgi',
    61     'host': None,
    62     'port': None,
    63     'socket': None,
    64     'method': 'fork',
    65     'daemonize': None,
    66     'workdir': '/',
    67     'pidfile': None,
    68     'maxspare': 5,
    69     'minspare': 2,
    70     'maxchildren': 50,
    71     'maxrequests': 0,
    72 }
    73 
    7474def fastcgi_help(message=None):
    7575    print FASTCGI_HELP
    7676    if message:
Back to Top