示例#1
0
def main():
    import logging
    logging.basicConfig(level=logging.INFO)
    material_file, category_file, mysql_uri, image_dir = parse_args()
    FoodMaterialCleaner(material_file=file(material_file),
            category_file=file(category_file), mysqldb=uri2service(mysql_uri),
            image_dir=image_dir).process()
示例#2
0
文件: index.py 项目: chenhc/laravel
def build_cache(mysql_uri, redis_uri):
    mysqldb = uri2service(mysql_uri)
    redisdb = uri2service(redis_uri)
    IndexCacher(mysqldb=mysqldb, redisdb=redisdb).build()