view wikiserverconfig.py @ 5051:95a4aa0eb1e9

caching: refactored locking to separate methods, new scope='dir' scope='dir' just means: use the directory specified by arena Use .lock() and .unlock() methods together with do_locking=False to manually lock/unlock (e.g. for a locked read-modify-write cycle). With do_locking=True, .lock() is automatically called by .open(), .unlock() is automatically called by .close(). Typical usage: try: cache.open('r') # open file, create locks data = cache.read() finally: cache.close() # important to close file and remove locks Removed the code that unlocks in .open()'s exception handler. Such stuff needs to be done in the caller's "finally:" block (which has to call .close(), which internally calls .unlock()). Only log IOErrors in .open() if it was for write mode. For read mode, it can be just a non-existing file, we don't want to log this case.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 29 Aug 2009 22:17:07 +0200
parents be29346a6aa3
children edb6cb2cac43
line wrap: on
line source
"""
    Standalone server configuration, you can either use this file or
    commandline options to configure server options.
"""

from MoinMoin.script.server.standalone import DefaultConfig

class Config(DefaultConfig):
    port = 8080 # if you use port < 1024, you need to start as root

    # if you start the server as root, the standalone server can change
    # to this user and group, e.g. 'www-data'
    #user = ''
    #group = ''

    # use '' for all interface or "1.2.3.4" for some specific IP
    #interface = 'localhost'

    # where the static data is served from:
    #docs = "/usr/share/moin/htdocs"

    # tuning options:
    #serverClass = 'ThreadPoolServer'
    #threadLimit = 10
    #requestQueueSize = 50