def get_config(name='default'): global config if config: return config from lucy.models.config import Config config = Config.load(name) return config
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)
def main(): obj = Config.load('default') process(obj)