diff options
author | Allan Saddi <allan@saddi.com> | 2005-05-18 10:11:02 +0000 |
---|---|---|
committer | Allan Saddi <allan@saddi.com> | 2005-05-18 10:11:02 +0000 |
commit | a8a85bf72115f6b84a655ed08872bf74410815a5 (patch) | |
tree | 9a2e5f6242ec062143cc0c78a58c15e4eada87ba | |
parent | ea969b5269ea13a6d4fe863d256288ec67ca8c42 (diff) | |
download | flup-a8a85bf72115f6b84a655ed08872bf74410815a5.tar.gz |
Fix wsgi.multiprocess for scgi_fork. (Set to True.)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | flup/server/scgi_base.py | 10 | ||||
-rw-r--r-- | flup/server/scgi_fork.py | 2 |
3 files changed, 12 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2005-05-18 Allan Saddi <asaddi@ganymede.saddi.net> + + * Fix wsgi.multiprocess for scgi_fork. (Set to True.) + 2005-05-15 Allan Saddi <asaddi@ganymede.saddi.net> * Prevent possible deadlock related to DiskSessionStore locking. diff --git a/flup/server/scgi_base.py b/flup/server/scgi_base.py index e9e6268..198f293 100644 --- a/flup/server/scgi_base.py +++ b/flup/server/scgi_base.py @@ -267,6 +267,11 @@ class BaseSCGIServer(object): # What Request class to use. requestClass = Request + # AFAIK, the current mod_scgi does not do load-balancing/fail-over. + # So a single application deployment will only run in one process + # at a time, on this server (when using a threaded server, of course). + _multiprocess = False + def __init__(self, application, scriptName='', environ=None, multithreaded=True, bindAddress=('localhost', 4000), allowedServers=None, @@ -340,10 +345,7 @@ class BaseSCGIServer(object): environ['wsgi.input'] = request.stdin environ['wsgi.errors'] = sys.stderr environ['wsgi.multithread'] = self.multithreaded - # AFAIK, the current mod_scgi does not do load-balancing/fail-over. - # So a single application deployment will only run in one process - # at a time, on this server. - environ['wsgi.multiprocess'] = False + environ['wsgi.multiprocess'] = self._multiprocess environ['wsgi.run_once'] = False if environ.get('HTTPS', 'off') in ('on', '1'): diff --git a/flup/server/scgi_fork.py b/flup/server/scgi_fork.py index 9609d69..103a1ce 100644 --- a/flup/server/scgi_fork.py +++ b/flup/server/scgi_fork.py @@ -72,6 +72,8 @@ from preforkserver import PreforkServer __all__ = ['WSGIServer'] class WSGIServer(BaseSCGIServer, PreforkServer): + _multiprocess = True + """ SCGI/WSGI server. For information about SCGI (Simple Common Gateway Interface), see <http://www.mems-exchange.org/software/scgi/>. |