diff options
| author | Eric Searcy | 2015-07-29 19:16:50 -0700 |
|---|---|---|
| committer | Barry Warsaw | 2017-02-10 11:58:53 -0500 |
| commit | 7cd3d7e9022a614ef424c266f542c1e5ea52666e (patch) | |
| tree | 7f9f4320bd988271e70a06a7314fb728bad460c8 /src | |
| parent | 2a4cade68d4d77c6107e090a39fad4a3011ee81d (diff) | |
| download | mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.tar.gz mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.tar.zst mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/rest/gunicorn.py | 16 | ||||
| -rw-r--r-- | src/mailman/rest/wsgiapp.py | 6 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/mailman/rest/gunicorn.py b/src/mailman/rest/gunicorn.py index e628dcd61..79e4ac504 100644 --- a/src/mailman/rest/gunicorn.py +++ b/src/mailman/rest/gunicorn.py @@ -35,16 +35,18 @@ __all__ = [ 'make_application', ] +# Initializing the Mailman system once. +from mailman.core.initialize import initialize +initialize() +from mailman.rest.wsgiapp import make_application as base_application +app = base_application() - -def make_application(): - """Create the WSGI application, after initializing the Mailman system. + +def make_application(environ, start_response): + """Create the WSGI application. Use this if you want to integrate Mailman's REST server with an external WSGI server, such as gunicorn. Be sure to set the $MAILMAN_CONFIG_FILE environment variable. """ - from mailman.core.initialize import initialize - initialize() - from mailman.rest.wsgiapp import make_application as base_application - return base_application() + return app(environ, start_response) diff --git a/src/mailman/rest/wsgiapp.py b/src/mailman/rest/wsgiapp.py index 83922ce9d..70d756405 100644 --- a/src/mailman/rest/wsgiapp.py +++ b/src/mailman/rest/wsgiapp.py @@ -216,11 +216,7 @@ class RootedAPI(API): @public def make_application(): - """Create the WSGI application. - - Use this if you want to integrate Mailman's REST server with your own WSGI - server. - """ + """Return a callable WSGI application object.""" return RootedAPI(Root()) |
