import os
import sys
import logging
import logging.handlers
from wikked.wiki import WikiParameters


def get_wsgi_app(wiki_root, log_file=None):
    os.chdir(wiki_root)
    logging.basicConfig(stream=sys.stderr)

    from wikked.web import app
    app.set_wiki_params(WikiParameters(wiki_root))

    if log_file is not None:
        h = logging.handlers.RotatingFileHandler(log_file, maxBytes=4096)
        h.setLevel(logging.WARNING)
        app.logger.addHandler(h)

    return app


@@ -135,16 +135,35 @@
 ile=None
+, async_update=True
 ):%0A    o
@@ -225,16 +225,118 @@
 tderr)%0A%0A
+    if async_update:%0A        import wikked.settings%0A        wikked.settings.WIKI_ASYNC_UPDATE = True%0A%0A
     from

Enable async update by default when using a WSGI application.