[Mailman-Developers] REST API speed

Andrew Stuart andrew.stuart at supercoders.com.au
Fri Jul 10 02:47:11 CEST 2015


I’ve fumbled around here to see if I can make it work with gunicorn.

Correct me if I’m wrong but effectively gunicorn would need to run the rest server within itself, so it would be necessary to run the rest server outside the mailman runners? I’m not sure how to do so.

rest/wsgiapp.py says:

# Both the REST server and the signal handlers must run in the main
# thread; the former because of SQLite requirements (objects created
# in one thread cannot be shared with the other threads), and the
# latter because of Python's signal handling semantics.



rest/wsgiapp.py also has the following function which seems to be the right wsgi app function to pass into gunicorn. I couldn’t find the right incantation to get it to run standlone.


def make_application():
    """Create the WSGI application.

    Use this if you want to integrate Mailman's REST server with your own WSGI
    server.
    """
    return RootedAPI(Root())


More information about the Mailman-Developers mailing list