Exemplo n.º 1
0
def server_runner(app, global_conf, **kw):
    """ Special version of paste.httpserver.server_runner which calls 
    AnkiServer.threading.shutdown() on server exit."""

    from paste.httpserver import server_runner as paste_server_runner
    from AnkiServer.threading import shutdown
    try:
        paste_server_runner(app, global_conf, **kw)
    finally:
        shutdown()
Exemplo n.º 2
0
def server_runner(app, global_conf, **kw):
    """ Special version of paste.httpserver.server_runner which calls 
    AnkiServer.threading.shutdown() on server exit."""

    from paste.httpserver import server_runner as paste_server_runner
    from AnkiServer.threading import shutdown
    try:
        paste_server_runner(app, global_conf, **kw)
    finally:
        shutdown()
Exemplo n.º 3
0
def server_runner(wsgi_app, global_conf, **kwargs):
    """Wrapper over paste.httpserver.server_runner() that injects the
    BufferedWSGIHandler as the handler class.
    """

    __doc__ = paste_server_runner.__doc__

    kwargs['handler'] = BufferedWSGIHandler
    return paste_server_runner(wsgi_app, global_conf, **kwargs)