Ticket #6163: runfcgi_default.diff
File runfcgi_default.diff, 2.7 KB (added by , 17 years ago) |
---|
-
django/core/servers/fastcgi.py
17 17 __version__ = "0.1" 18 18 __all__ = ["runfastcgi"] 19 19 20 FASTCGI_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 20 35 FASTCGI_HELP = r""" 21 36 Run this project as a fastcgi (or some other protocol supported 22 37 by flup) application. To do this, the flup package from … … 25 40 runfcgi [options] [fcgi settings] 26 41 27 42 Optional 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. 30 45 port=PORTNUM port to listen on. 31 46 socket=FILE UNIX socket to listen on. 32 method=IMPL prefork or threaded (default prefork)47 method=IMPL prefork or threaded (default %(method)s) 33 48 maxrequests=NUMBER number of requests a child handles before it is 34 49 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) 38 53 daemonize=BOOL whether to detach from terminal. 39 54 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) 41 56 42 57 Examples: 43 58 Run a "standard" fastcgi process on a file-descriptor … … 54 69 $ manage.py runfcgi socket=/tmp/fcgi.sock method=prefork \ 55 70 daemonize=true pidfile=/var/run/django-fcgi.pid 56 71 57 """ 72 """ % FASTCGI_OPTIONS 58 73 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 74 74 def fastcgi_help(message=None): 75 75 print FASTCGI_HELP 76 76 if message: