Beispiel #1
0
def get_config(name='default'):
    global config
    if config:
        return config

    from lucy.models.config import Config
    config = Config.load(name)
    return config
Beispiel #2
0
def main():
    try:
        conf = Config.load('default')
    except KeyError:
        puts("Error: Need to init the db")
        sys.exit(1)

    pool = conf['pool']

    shutil.rmtree(pool)
    os.makedirs(pool)

    for x in db.collection_names():
        if x.startswith('system'):
            continue
        db.drop_collection(x)
Beispiel #3
0
def main():
    obj = Config.load('default')
    process(obj)